Callback function

View: New views
2 Messages — Rating Filter:   Alert me  

Callback function

by Nick Poole :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there any why to register a callback function for when a sound has
finished playing?
_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

Re: Callback function

by Jason Daly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nick Poole wrote:
> Is there any why to register a callback function for when a sound has
> finished playing?
>  

No, there isn't.  The closest way to do this is to do a periodic check
like this:

alGetIntegeriv(sourceID, AL_SOURCE_STATE, &state);
if (state != AL_PLAYING)
{
   /* code here */
}


--"J"

_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal