Closed. This question needs to be more focused。它当前不接受答案。
                            
                        
                    
                
                            
                                
                
                        
                            
                        
                    
                        
                            想改善这个问题吗?更新问题,使其仅通过editing this post专注于一个问题。
                        
                        去年关闭。
                                                                                            
                
        
当我的应用程序运行时,如何让ipod播放继续进行?

最佳答案

在启动时,您需要通过调用来初始化AudioSession

AudioSessionInitialize(NULL,NULL,NULL,NULL);


然后将您的音频类别设置为kAudioSessionCategory_AmbientSound,就像这样

UInt32  sessionCategory = kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
AudioSessionSetActive(true);

关于ios - 实现ipod播放,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1090871/

10-16 08:44