Saturday, December 10, 2011

Ignore the Mute Button

So you want your sounds to play even if the iPad, iPhone, iPod is muted?

Simple:


UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;

AudioSessionSetProperty(kAudioSessionProperty_Audi oCategory, sizeof(sessionCategory), &sessionCategory);

These two lines will force your sounds to play even if the mute button is flipped on. This used to be very much not okay, but recently Apple has changed their stance, so go wild.

No comments:

Post a Comment