views:

15

answers:

0

I have some Audiotoolbox sounds.

I created a sound in a UIViewController A. Using AudioServices functions, I play them, and it's fine.

When I change the system sound volume via device (with my finger), the sound's volume behaves just fine and changes accordingly.

But then I alloc another UIViewController B and add its view as a subview of A's view.

Strangely enough, when B occupies the screen on top of A's view, the sound's volume is not changed anymore when I change the system sound. It just stays the same. Please note that we are talking about the same sound alloced in A. (Yes, A is still active while B occupies the screen)

AVFoundation sounds will make my game lag, also it's just one sound at a time (which would suck for my game that play many times the same sound simultaneously), so I'd really like to keep AudioToolBox.

Can someone answer this riddle?