CCSimpleAudioEngine in iOS can only play 1024 effects

Hey
I love that I now can play two or more of the same sound effects at the same time on iOS. There is however a problem when you try to call CCSimpleAudioEngine.PlayEffect more than 1024 times. The sound will not be played and the application output will begin to write out: "Failed to generate OpenAL data buffer". I have tested this on 4 different iOS devices and the results are all the same; No sound after 1024 sound effects.
I found this discussion about it but it yielded no solution.

To reproduce the sound bug I used the following code:
CCSimpleAudioEngine sound = new CCSimpleAudioEngine(); for (int i = 0; i < 10240; i++) { sound.PlayEffect("sounds/bib"); Console.WriteLine("PlayEffect: " + i); }

I have as a simple hack tried to initialize a new CCSimpleAudioEngne every 1024 times but this also gave me a weird result. By doing this the sound returned after about 10,000 calls to CCSimpleAudioEngine.PlayEffect. This however is not consistent with each test.

Sign In or Register to comment.