Okay, I reproduced your problem. It looks like Apple’s OpenAL implementation has a hardcoded limit on the number of alBuffers that can be generated.
Opening as many stream files as you are is a fringe case I’m not sure if we’re going to support. As I said elsewhere, the number of files you can open is limited on OS’s so you are already risking on pushing other limits. However, you got hit by an OpenAL limit first. You should take this as a clue that you should be closing streams you are not currently using.
Reverting back to the old audio changes will lose streaming optimizations designed to minimize buffer under run conditions, so we are not going to revert our changes.
However, since I have already announced many of the secret audio APIs, I will share one more that I omitted. Be warned, setting these to bad values will really mess up performance and I don’t really want people messing with these which is why I didn’t share them before.
(See the ALmixer implementation if you really want to understand what’s going on.)
But I created this backdoor API just in case people needed to fine tune performance in case buffer under runs were a serious problem. In your case, you might tweak it to restore the old behavior.
audio.loadStream supports a table parameter with 4 keys:
audio.loadStream(file, {bufferSize=4096, maxQueueBuffers=25, startupBuffers=8, buffersQueuedPerUpdate=4})
(Note: The values listed here are the current defaults.)
The old default before the change was something like the equivalent of:
audio.loadStream(file, {bufferSize=16384, maxQueueBuffers=5, startupBuffers=2, buffersQueuedPerUpdate=1})
(The last parameter didn’t exist in the older builds and is part of the new optimizations.)
I am currently thinking I might change the defaults to:
audio.loadStream(file, {bufferSize=8192, maxQueueBuffers=12, startupBuffers=4, buffersQueuedPerUpdate=2})
but I am undecided on this.
[import]uid: 7563 topic_id: 8782 reply_id: 60474[/import]