gpt4 book ai didi

iPhone AudioStreamer 在后台 OS4 上不工作

转载 作者:搜寻专家 更新时间:2023-10-30 19:59:03 24 4
gpt4 key购买 nike

我使用 Matt Galagher 的 AudioStreamer http://github.com/mattgallagher/AudioStreamer/它工作正常,但是如何在 iPhone OS4 的后台工作?

最佳答案

查看 this文件,特别是:

Applications that play audio can continue playing that audio while in the background. To indicate that your application plays background audio, include the UIBackgroundModes key to its Info.plist file. The value for this key is an array containing the audio string. When this key is present, the system’s audio frameworks automatically prevent your application from being suspended when it moves to the background. Your application continues to run in the background as long as it is playing audio. However, if this key is not present when the application moves to the background, or if your application stops playing audio while in the background, your application is suspended.

You can use any of the system audio frameworks to initiate the playback of background audio and the process for using those frameworks is unchanged. Because your application is not suspended while playing audio, the audio callbacks operate normally while your application is in the background. While running in the background, your application should limit itself to doing only the work necessary to provide audio data for playback. Thus, a streaming audio application would download any new data from its server and push the current audio samples out for playback.

关于iPhone AudioStreamer 在后台 OS4 上不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3423331/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com