0

Is it possible to force a audio file to play through the iPhone speakers even if headphones are plugged in?

Linuxmint
  • 4,716
  • 11
  • 44
  • 64
  • 1
    I very much hope not! Why would you want to force that on your user? I would delete your app immediately if it started blurting audio when I expected it would be silently channeled to my headphones. – David Mar 10 '11 at 19:11
  • Duplicate question: http://stackoverflow.com/questions/1064846/iphone-audio-playback-force-through-internal-speaker – Namratha Aug 10 '11 at 09:37

2 Answers2

12

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.

tc.
  • 33,468
  • 5
  • 78
  • 96
-3

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

Radu
  • 3,434
  • 4
  • 27
  • 38