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?
We understand you're looking to change the default audio output source for phone calls on your iPhone. There is a settings in Settings > Accessibility > Touch > Call Audio Routing where you can set it to Automatic, Bluetooth Headset or Speaker. Give that a try. Thanks.
Go to Settings > Sounds (or Settings > Sounds & Haptics), and drag the Ringer and Alerts slider back and forth a few times. If you can't hear any sound, or if your speaker button on the Ringer and Alerts slider is dimmed, your speaker may need to be serviced.
I'm not sure how you are doing your audio playback, but try having a look at the "Redirecting Output Audio" section of the Audio Session Programming Guide
It looks something like this:
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; // 1
AudioSessionSetProperty (
kAudioSessionProperty_OverrideAudioRoute, // 2
sizeof (audioRouteOverride), // 3
&audioRouteOverride // 4
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With