tobias.waldvogel@realtech.de
2002-Apr-02 01:31 UTC
AW: [vorbis-dev] Ogg Vorbis and DirectSound streaming
BTW: You can pass also the float32 data directly to DirectSound instead of doing the conversion (float32->int16) yourself. Have a look at "WAVEFORMATEXTENSIBLE" in the Windows Platform SDK Tobias Waldvogel -----Ursprüngliche Nachricht----- Von: Martin Cesky [mailto:martin@scssoft.com] Gesendet: Dienstag, 2. April 2002 11:02 An: vorbis-dev@xiph.org Betreff: Re: [vorbis-dev] Ogg Vorbis and DirectSound streaming <p>i have a library which uses the direct sound same way as you describe it and it works perfectly, i can send you a code snippet which handle the stream notification, if you want. Martin Cesky ----- Original Message ----- From: "Xeno Meno" <xenomeno@hotmail.com> To: <vorbis-dev@xiph.org> Sent: Thursday, March 21, 2002 1:44 PM Subject: [vorbis-dev] Ogg Vorbis and DirectSound streaming <p>> 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. Theinterface> 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 theheader> 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 callbackfunctions> 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 andit> 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 > ortwo> 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 forPentium> 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 > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > --- >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. ><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@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.