当我的应用程序正在运行时,如何让 ipod 播放继续?
问问题
297 次
2 回答
4
在启动时,您需要AudioSession
通过调用
AudioSessionInitialize(NULL,NULL,NULL,NULL);
然后将您的音频类别设置为kAudioSessionCategory_AmbientSound
,就像这样
UInt32 sessionCategory = kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
AudioSessionSetActive(true);
于 2009-07-07T08:09:22.397 回答
1
I'm pretty sure that it has nothing to do with your app (i.e. a special background service runs for the ipod), but i could be wrong...
于 2009-07-07T07:42:54.477 回答