Jump to content

Mac Openal Issues


Recommended Posts

I'm writing what I found regarding OpenAL issues of Mac OS X and wish it will be hints for somebody.

I couldn't understand how to loop sound. Certainly the loop flag is set to the sound source but the program looks it unqueue the buffers which are processed, and then delete them. Anyway, it causes an error on Mac OS X. If you set the loop flag, you can't unqueue the buffers. This is the reason for the error of alSourceUnqueueBuffers() in vsrc_deque_finished_bufs(). In this case, avoidance is quite simple. I mean, we don't need to call alSourceUnqueueBuffers() when the loop flag is set.

A second issue is big. It may require to change the sound manager. Apple's OpenAL (on top of Core Audio) is always running in another thread. Stop Sound command (issued by alSourceStop) is queued in the internal queue. This means we can't delete the buffer associated the sound source which we stopped just after calling alSourceStop. There is a delay to stop sound really. The sound manager uses fire-and-forget style. This doesn't match Apple's OpenAL.

Link to comment
Share on other sites

  • 1 month later...

Well, we removed the sub-allocation of Sources and that eliminated some issues. Then we changed the way that we handle looped sounds and found that there is still a race condition on the buffers.

We are currently looking at OpenALSoft as a possible solution on OS/X.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...