Recorded Wave is not playing with media player but plays with Recorder?

Recorded Wave is not playing with media player but plays with Recorder?

Post by Ganesha » Sat, 10 Feb 2001 00:34:31



Hi ,

I  recorded a voice using  tapi trial program  available with Michael Dun's
site.
I could play with Windows recorder but not using windows media player?

The Audio Format property  shows : PCM,          instead of
                                                        PCM,8,000 Hz, 16
Bit, Mono

How can we overcome this ? Any change in the waveformat is required,
I  compiled with following setting

WAVEFORMATEX messageFormat = {WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 16};

Regards,

ganeshan

 
 
 

Recorded Wave is not playing with media player but plays with Recorder?

Post by Frederic Clemen » Sat, 10 Feb 2001 18:02:39


You should be able to play with both.
If the Media Player is able to play other wave files, then one possible
reason is that the format of the file written is not totaly legal (I mean
there are some errors in the syntax or in the computed parameters saved) ;
Sound Recorder would be not so strict and would be able to read the file
"correctly" and play it ; the media player would be more strict on the
format and reject the file.

In fact - after re-reading your post - the main reason seams to be that you
misunderstood the WAVEFORMATEX ; see sample code below

VOID XCACMStream::FillFormat_PCM8000(WAVEFORMATEX& PCM_format)
{
    ZeroMemory(&PCM_format, sizeof(PCM_format));
    PCM_format.wFormatTag      = WAVE_FORMAT_PCM;
    PCM_format.nChannels       = 1;
    PCM_format.nSamplesPerSec  = 8000;
    PCM_format.nAvgBytesPerSec = sizeof(SHORT) * 8000;
    PCM_format.nBlockAlign     = sizeof(SHORT);
    PCM_format.wBitsPerSample  = sizeof(SHORT) * 8;
    PCM_format.cbSize          = 0;

Quote:}

8000 = the frequency
sizeof(SHORT) = 16-bit sample

so you should have {WAVE_FORMAT_PCM, 1, 8000, 16000, 2, 16, 0};


Quote:> Hi ,

> I  recorded a voice using  tapi trial program  available with Michael
Dun's
> site.
> I could play with Windows recorder but not using windows media player?

> The Audio Format property  shows : PCM,          instead of
>                                                         PCM,8,000 Hz, 16
> Bit, Mono

> How can we overcome this ? Any change in the waveformat is required,
> I  compiled with following setting

> WAVEFORMATEX messageFormat = {WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 16};

> Regards,

> ganeshan


 
 
 

Recorded Wave is not playing with media player but plays with Recorder?

Post by Ganesha » Tue, 13 Feb 2001 00:33:12


Hearty Thanks dear Frederic Clement,

I  respect your deep understanding on the subject.

If I am  not too inquisitive,  can  I  know more about you?

I am in to CTI solutions ( Robust), using TAPI  with Voice Modem / Other
Voice boards.
( Voice Mail, IVR, Auto Dialing, ACD using Modem as well)

Regards,

Ganeshan


> You should be able to play with both.
> If the Media Player is able to play other wave files, then one possible
> reason is that the format of the file written is not totaly legal (I mean
> there are some errors in the syntax or in the computed parameters saved) ;
> Sound Recorder would be not so strict and would be able to read the file
> "correctly" and play it ; the media player would be more strict on the
> format and reject the file.

> In fact - after re-reading your post - the main reason seams to be that
you
> misunderstood the WAVEFORMATEX ; see sample code below

> VOID XCACMStream::FillFormat_PCM8000(WAVEFORMATEX& PCM_format)
> {
>     ZeroMemory(&PCM_format, sizeof(PCM_format));
>     PCM_format.wFormatTag      = WAVE_FORMAT_PCM;
>     PCM_format.nChannels       = 1;
>     PCM_format.nSamplesPerSec  = 8000;
>     PCM_format.nAvgBytesPerSec = sizeof(SHORT) * 8000;
>     PCM_format.nBlockAlign     = sizeof(SHORT);
>     PCM_format.wBitsPerSample  = sizeof(SHORT) * 8;
>     PCM_format.cbSize          = 0;
> }

> 8000 = the frequency
> sizeof(SHORT) = 16-bit sample

> so you should have {WAVE_FORMAT_PCM, 1, 8000, 16000, 2, 16, 0};



> > Hi ,

> > I  recorded a voice using  tapi trial program  available with Michael
> Dun's
> > site.
> > I could play with Windows recorder but not using windows media player?

> > The Audio Format property  shows : PCM,          instead of
> >                                                         PCM,8,000 Hz, 16
> > Bit, Mono

> > How can we overcome this ? Any change in the waveformat is required,
> > I  compiled with following setting

> > WAVEFORMATEX messageFormat = {WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 16};

> > Regards,

> > ganeshan