开发者

Force play audio file through iPhone speakers?

开发者 https://www.devze.com 2023-02-16 15:13 出处:网络
Is it possible to force a audio file to play through the iPhone speakers even if headphones are p开发者_如何学Clugged in?See Audio Session Cookbook: Redirecting Output Audio. Briefly,

Is it possible to force a audio file to play through the iPhone speakers even if headphones are p开发者_如何学Clugged in?


See Audio Session Cookbook: Redirecting Output Audio. Briefly,

  1. Set the category to kAudioSessionCategory_PlayAndRecord
  2. Set kAudioSessionProperty_OverrideAudioRoute to kAudioSessionOverrideAudioRoute_Speaker

If that doesn't work, then there probably isn't a way to do it.


Short answer No. Sorry. I tried to find something like this once but no luck. Apple is pretty vaige about this things.

0

精彩评论

暂无评论...
验证码 换一张
取 消