Hi,
I installed the vorbis.acm codec and tried to play the ogg file using waveout APIs. The return value for waveOutPrepareHeader(), waveOutWrite() and waveOutUnprepareHeader is 0(success) only but the sound is not playing.
I set the waveformatex structure as follows.
WAVEFORMATEX waveform;
waveform.wFormatTag = WAVE_FORMAT_VORBIS2;
waveform.nChannels = 2;
waveform.nSamplesPerSec = 22050;
waveform.wBitsPerSample = 16;
waveform.cbSize = 0;
waveform.nBlockAlign = (waveform.nChannels * waveform.wBitsPerSample)/8;
waveform.nAvgBytesPerSec = 8000;
I set the wavehdr structure as follows.
WaveHeader.lpData=buffer;
WaveHeader.dwBufferLength=4080;
WaveHeader.dwFlags=0;
WaveHeader.dwLoops=0;
Can anybody please suggest what is the problem with my settings?
Thanks.
|