iOS Background Audio Icon
I've followed the API Docs and WWDC Videos exactly, to play audio in the background via an Audio开发者_开发知识库 Session (using the AudioQueue services). It all works just fine, but there is no "Play" indicator displayed in the Status Bar.
Do i have to set this separately or is it a Bug?
I think this was done by the Audio Session:
// before instantiating the playback audio queue object,
// set the audio session category
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty (
kAudioSessionProperty_AudioCategory,
sizeof (sessionCategory),
&sessionCategory
);
// activate the audio session immmediately before playback starts
AudioSessionSetActive (true);
精彩评论