Hi all! I've problem with playing ogg files. I'm triing to use tripple buffer method: +-------------+ +-| buffer 1 |-+ | +-------------+ | | | | +-------------+-+ | | buffer 2 | | +-------------+-+ | | | +-------------+-+ +-| buffer 3 | +-------------+ 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! Michal Simonik --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
----- Original Message ----- From: "Caryfuk" <sim22um@axpsu.fpf.slu.cz> To: <vorbis-dev@xiph.org> Sent: Wednesday, March 14, 2001 11:44 AM Subject: [vorbis-dev] Playing Problems :(> > Hi all! > > I've problem with playing ogg files. I'm triing to use tripple buffer > method:AFAIK double/circular-buffering is enough.> > +-------------+ > +-| buffer 1 |-+ > | +-------------+ | > | | > | +-------------+-+ > | | buffer 2 | > | +-------------+-+ > | | > | +-------------+-+ > +-| buffer 3 | > +-------------+ > > 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:I guess you hear a click between stop first buffer and start second buffer.> > 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!Exactly what is the problem?> > Michal Simonik > > > --- >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@xiph.org'> containing only the word 'unsubscribe' in the body. No subject is needed. > Unsubscribe messages sent to the list will be ignored/filtered. >--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.