iPhone SDK SDL_openAudio支持多任务处理

时间:2022-10-23 12:05:37

I'm playing audio from a Online Live RTPS Stream with ffmpeg(because Apple doesn't support rtsp live streaming).

我正在用ffmpeg播放在线实时RTPS流的音频(因为苹果不支持rtsp实时流媒体)。

Now I would play my Stream in the background. I started a thread in the background and registered the music for Background support.

现在我在后台播放我的流。我在后台启动了一个线程,并注册了音乐作为后台支持。

When the Application is entering in Background the NSThread is paused, and then Resuming after returning from background.

当应用程序进入后台时,NSThread将暂停,然后从后台返回后恢复。

If I start playing a Music (MP3-Stream) in the Application which use official Apple Frameworks then when the App is entering Background both Streams are played.

如果我在应用程序中开始播放音乐(MP3-Stream),那么当应用程序进入后台时,两个流都会播放。

What can I do to fix this?

我该怎么做才能解决这个问题呢?

1 个解决方案

#1


2  

Well, by popular demand ;), here comes the answer;

好吧,根据大众的需求;)

This very much sounds like an audio-session issue. You should try and fiddle a little with the session attributes: AudioSessionProgrammingGuide

这听起来就像一个音频会话问题。您应该尝试一下会话属性:AudioSessionProgrammingGuide

#1


2  

Well, by popular demand ;), here comes the answer;

好吧,根据大众的需求;)

This very much sounds like an audio-session issue. You should try and fiddle a little with the session attributes: AudioSessionProgrammingGuide

这听起来就像一个音频会话问题。您应该尝试一下会话属性:AudioSessionProgrammingGuide