`
fuerbosi
  • 浏览: 464072 次
文章分类
社区版块
存档分类
最新评论

ios audio playback technologies

 
阅读更多
Table 3-2Audio interruption handling techniques according to audio technology

Audio technology

How interruptions work

AVFoundationframework

TheAVAudioPlayerandAVAudioRecorderclasses provide delegate methods for interruption start and end. Implement these methods to update your user interface and optionally, after interruption ends, to resume paused playback. The system automatically pauses playback or recording upon interruption, and reactivates your audio session when you resume playback or recording.

If you want to save and restore playback position between application launches, save playback position on interruption as well as on application quit.

Audio Queue Services, I/O audio unit

These technologies put your application in control of handling interruptions. You are responsible for saving playback or recording position and reactivating your audio session after interruption ends. As explained in“Responding to Audio Session Interruptions,”implement theAVAudioSessioninterruption delegate methods or write an interruption listener callback function.

If using these technologies for hardware-assisted encoding to AAC, refer to“Hardware-Assisted Codecs and Audio Interruptions.”

OpenAL

When using OpenAL for playback, implement theAVAudioSessioninterruption delegate methods or write an interruption listener callback function—as when using Audio Queue Services. However, the delegate or callback must additionally manage the OpenAL context. See“OpenAL and Audio Interruptions.”

System Sound Services

Sounds played using System Sound Services go silent when an interruption starts. They can automatically be used again if the interruption ends. Applications cannot influence the interruption behavior for sounds that use this playback technology.


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics