Hello, I'm working on a music visualizer for the iphone/ipad, under iOS 3 you could double tap the home button and get iPod controls. With the latest version 4.1-4.2 these controls are now part of the task manager on the bottom. They are also grayed out when the home button is pressed. I found a similar complaint at
rdar://8696944: iPod mini controls don't work in apps using AVAudioSessionCategoryAmbient sound, although there wasn't a solution.
I have the base sound category set to kAudioSessionCategory_PlayAndRecord, with kAudioSessionProperty_OverrideCategoryMixWithOther s set to true. (Just to add more fun to the problem I'm using OpenAl for some sound effects.)
I have tried setting the category back to ambient when the application goes into the background. but either it happens too late or it's not sufficient.
thanks!
ps. this is cross posted this to stack overflow
iphone - iPod mini controls disabled when certain audio session parameters are set - Stack Overflow
Someone there came up with a minimal example:
AudioSessionInitialize(NULL, NULL, NULL, self);
UInt32 sessionCategory = kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty(kAudioSessionProperty_Audi oCategory, sizeof(sessionCategory), &sessionCategory);
devicetwo = alcOpenDevice(NULL);
contexttwo = alcCreateContext(devicetwo, 0);
//The following two lines are the lines that gray out iPod controls:
alcMakeContextCurrent(contexttwo);
AudioSessionSetActive(YES);