Jump to content
  • Advertisement


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


Ogg Vorbis Streaming Question

This topic is 5401 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
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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!