Well, that was pretty easy...
So, it turns out that multi-threading with OpenAL/Ogg Vorbis is easier than I expected, which is always a bonus [grin]
Once I got passed the 'dont even try to use the dynamic dll runtime' issue with the Win32 libraries (someone REALLY needs to fix that, I've tried but even a recompile with the right settings doesnt seem to fix it) and found some simple template code from devmaster for streaming it was a pretty easy fix to write a little adapter struct and plug it into a boost::thread object, tada! streaming Ogg Vorbis files [smile]
One thing of note, the streaming example sitting in a loop and queries the state of the playback in the orignal thread, for some reason this causes things to explode with OpenAL. This is probably down to me writting data in one thread and querying OpenAL in another, which I'm guessing isnt remotely reentrant thus its a short trip to errorville via no-more-sound town [wink]
Once I got passed the 'dont even try to use the dynamic dll runtime' issue with the Win32 libraries (someone REALLY needs to fix that, I've tried but even a recompile with the right settings doesnt seem to fix it) and found some simple template code from devmaster for streaming it was a pretty easy fix to write a little adapter struct and plug it into a boost::thread object, tada! streaming Ogg Vorbis files [smile]
One thing of note, the streaming example sitting in a loop and queries the state of the playback in the orignal thread, for some reason this causes things to explode with OpenAL. This is probably down to me writting data in one thread and querying OpenAL in another, which I'm guessing isnt remotely reentrant thus its a short trip to errorville via no-more-sound town [wink]
0
Sign in to follow this
Followers
0
3 Comments
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now