Click here to Skip to main content
15,900,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I installed the vorbis.acm codec. I 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.
Posted
Updated 4-Jul-11 21:18pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900