Re: Creating callback for streaming
Chris Robinson <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
On Saturday, October 09, 2010 12:41:07 am Susmith M R (RBEI/ECF1) wrote: > Hi all, > Why there is no callback mechanism in OpenAL. Is there any design related > reason for not providing a callback mechanism for OpenAL. Partly because different languages could have difficulty providing a callback, and also because allowing user code to run in the mixer (for such implementations) can cause stability concerns, and because the lib itself may not know, when mixing is done remotely (i.e., the lib may not know how many buffers are played either, until you query for the source position or processed buffer count and its internal state gets updated). > Just polling is > a very bad way of doing the notification for streaming. I feel this in my > code. Since the OpenAL is a crossplatform API, Calculating the sleep time > for polling a difficult way. Please tell me how is it possible to get the > notification from the OpenAL that the Buffer I submitted is finished > playing.. There is Alure(*). The Git version has functions to automatically play a stream on a source and run a callback to get more data when it detects a buffer has been processed.. though you don't get direct access to the buffer handles, as the lib manages that for you. (*) http://kcat.strangesoft.net/alure.html I really should do another release sometime soon... _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal