Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在构建一个需要播放音频文件的应用程序,以便在设备扬声器上播放音频,而在外部显示器上播放视频 - 通过 HDMI 显示适配器或 Apple TV 连接。是否可以指定音频播放的位置?
您可以通过设置 AudioSession.RoutingOverride 来设置 AudioSession 音频路由。坏消息是,除了 None 和 Speakers 之外,这并没有提供太多控制。
有关更多信息,请参阅:
http://developer.apple.com/library/ios/#documentation/AudioToolbox/Reference/AudioSessionServicesReference/Reference/reference.html#//apple_ref/doc/constant_group/Audio_Session_Category_Route_Overrides