[Openal] non-realtime sound simulation (simulating only N msec per
frame)
maxxedout at comcast.net
maxxedout at comcast.net
Tue Jan 19 12:21:22 PST 2010
Hi guys, this is my first work with OpenAL, I'm new here, and if this is a stupid question don't hesitate to let me know. :) Also, if you need more information in order to answer the question, I will do my best to answer.
So here's the scenario: I am modifying a game I play (Alien Arena) which uses openAL for sound. I am adding a feature which allows you to export videos. The export feature lets you set a desired output framerate, then it changes the main loop so that exactly 1000/framerate milliseconds are simulated every frame. The idea is that you first record a demo normally, then play it back and have it export the video.
Is there a way to do this with the audio in openAL as well? So if the export framerate is 25, can I have openAL simulate 40 Milliseconds and then just stop? Also, can I have it "render" the mixed PCM sound into a buffer instead of (or as well as) playing it on the soundcard?
The reason I ask is that all the tutorials and documentation I have seen refer to alSourcePlay and alSourceStop, but nothing about setting an amount of time to simulate before stopping automatically.
Thanks,
-Max.
More information about the Openal
mailing list