Jump to content
  • Advertisement
Sign in to follow this  

OpenAL: Callbacks?

This topic is 3533 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am wrapping the source into a AudioSource class which has convenient methods to execute an audio. The problem is that I want to execute some business logic just before the source ends playing. I cannot use a "while" to query the audio until its status is AL_STOPPED because the new layout will be redraw later in the execution flow. I already have the necessary classes to create callbacks but now I am trying to figure out if OpenAL provides me some mechanism to attach these callbacks. This is the real problem: I have a Button class that has a AudioSource and two different loyouts, one for the normal state and the other for when it is touched. The touch method then will show the "touch" layout, play the audio and finally swap again to the normal layout. The first layout change can be done without callbacks. I am open to suggestions :-)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!