Modifying streaming sound in realtime
Joseph Cooper <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
I'm working on an application that is streaming audio synthesized on the fly. When a new synthesized sound begins, the response is very rapid because I can grab a free source and immediately begin queuing up buffers. The difficulty arises when the currently streamed audio needs to change. In the worst case, the system will have just pushed a newly filled buffer onto the queue and so the change will not be realized until both the current buffer and queued buffer are processed. It seems that even if I shrink my buffers down to as small as they can be without causing starvation problems, there is still noticeable lag. If we assume that I can "rewind" the synthesizer back to the present time (it needs rewinding because it has already spooled off a frame of sound into the future without accounting for the change that just occurred), I could stop the source, de-queue the buffers and then refill and re-queue with the newest data but obviously that will result in an undesirable hitch in the sound stream. Is there a better way? How can I change (not just stop) a streaming source with minimal lag? jc _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal