[vorbis-dev] Playing Problems :(
Matthijs Laan
matthijsln at xs4all.nl
Wed Mar 14 07:31:01 PST 2001
At 11:44 14-3-01, you wrote:
>First i fill all buffest with ov_read. Then I start to play firts buffer.
>When i stops I'll start to play second buffer and fill firts buffer with
>ov_read. Buffer setting are:
>
> p_oggB->wfx.wFormatTag = WAVE_FORMAT_PCM;
> p_oggB->wfx.nChannels = oggstruct.vi->channels;
> p_oggB->wfx.nSamplesPerSec = (unsigned long) oggstruct.vi->rate;
> p_oggB->wfx.wBitsPerSample = 16;
> p_oggB->wfx.nBlockAlign = (oggstruct.vi->channels *
>p_oggB->wfx.wBitsPerSample) / 8;
> p_oggB->wfx.nAvgBytesPerSec = (unsigned long)
>(p_oggB->wfx.nSamplesPerSec * p_oggB->wfx.nBlockAlign);
> p_oggB->wfx.cbSize = 0;
>
>Could someone send me source code, how he is playing ogg file, or give me
>some hint? Thanks a lot!
You can send all three buffers to waveOut without waiting for the first one
to finish. When a buffer is done playing, fill the played buffer with new
data and send it to waveOut. Just make sure you don't overwrite buffers
you have sent to waveOut which are still playing or queued for playing.
This is a Win32 waveOut question, which has nothing to do with Ogg Vorbis
specifically. Better ask somewhere else next time.
HTH,
Matthijs
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list