iPhone audio playback: force through internal speaker?

后端 未结 2 740
抹茶落季
抹茶落季 2020-12-01 08:52

Does anyone know if it is possible to implement playback of an audio file through the internal speaker even if the headphones are plugged in?

2条回答
  •  感情败类
    2020-12-01 09:32

    Actually i think this is not possible, as there seems to be some kind of mechanical switch, which indicates a plugged in headset thus preventing speaker output when this is the case. (read here)

    Some other hints can be found in the description of kAudioSessionProperty_OverrideCategoryDefaultToSpeaker: "Specifies whether or not to route audio to the speaker (instead of to the receiver) when no other audio route, such as a headset, is connected."

提交回复
热议问题