[vorbis-dev] Ogg Vorbis and DirectSound streaming
Xeno Meno
xenomeno at hotmail.com
Thu Mar 21 13:44:02 PST 2002
hi,
I downloaded the vorbis-sdk-1.0rc3 and wrote an application that plays ogg
files using DirectSound(win32 application). It uses streaming technique -
I'm implementing and passing IStream interface to the DirectX. The interface
is used by DirectX to fill his buffers during playing. DirectX is assuming
that it's readind from a wav file, so the interface decodes on-the-fly so
that DirectX still thinks it reads from a wav file(emulating also the header
of the wav file). It plays the songs for some time but at some point the
application crashesh.
The decoding is built on the vorbisfile sample passing a callback functions
to ov_open_callbacks(). For the streaming technique to work the IStream
interface must implement read/seek functions so they are build using only
ov_read() and ov_pcm_seek() from the vorbis-sdk. First, I thought that the
problem is that more than one thread is trying to use this functions and it
forces the application to crash but I've added EnterCriticialSection() and
LeaveCriticalSection() in the read and seek methods - the problem haven't
disappeared(the application can mix more than one sound during playing). Can
someone help me with some hints what the problem can be.
The strange thing is that it crashes randomly(it can play a song one or two
times and crash during the third play even if I haven't started a secong
sound to play).
I'm using Visual C++ 6.0, win32 application with code generation for Pentium
Pro and a 2 byte alligment. I have recompiled the voribs libs(static
linking) with the same parameters as the project.
thanks in advance,
bye
<p>_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
<p>--- >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