Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GremlinX

Ogg Vorbis Streaming Question

This topic is 5227 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am currently use the Ogg/Vorbis file format for my latest game project, but currently I load the entire file into memory and play it using DirectSound. I am very interested in converting this to use a streaming method, but I am completely lost after reading all the stuff on the Ogg site. Does anyone have any experience doing this that can provide some working code? Thanks for your help, Jon

Share this post


Link to post
Share on other sites
Advertisement
1. create a 2 second buffer (just an example)
1a. force this buffer to be a software buffer, because sometimes hardware buffers don''t do notifications properly
2. get a IDirectSoundNotify8 interface
3. use this interface to tell DirectSound to notify you at 1 second and 1.9999999 seconds [2 seconds, minus 1 byte] (just an example)
4. create a thread
5. inside this thread, use WaitForMultipleObjects() with infinite timeout.
6. when an event is signaled (direct sound notification) this is your cue to read in a bit more of the ogg file.

Good luck...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!