mtkaz Posted June 29, 2011 Report Share Posted June 29, 2011 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. Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted August 22, 2011 Report Share Posted August 22, 2011 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.