-1

How to judge whether the system has other software are playing music ios? Thankyou!!!</p>

4

1 回答 1

1

要查看是否正在播放其他音频,您可以检查kAudioSessionProperty_OtherAudioIsPlaying属性。从文档

UInt32 propertySize, audioIsAlreadyPlaying;

propertySize = sizeof(UInt32);
AudioSessionGetProperty(kAudioSessionProperty_OtherAudioIsPlaying, &propertySize, &audioIsAlreadyPlaying);

如何检测其他应用是否正在播放背景音频?

于 2012-12-01T12:57:33.380 回答