Is it possible to force audio through the headphone jack even if an HDMI adatper is connected?

I see that iOS 5.0 now has constants for multiple Audio Routes:

const CFStringRef kAudioSessionOutputRoute_LineOut;
const CFStringRef kAudioSessionOutputRoute_Headphones;
const CFStringRef kAudioSessionOutputRoute_BluetoothHFP;
const CFStringRef kAudioSessionOutputRoute_BluetoothA2DP;
const CFStringRef kAudioSessionOutputRoute_BuiltInReceiver;
const CFStringRef kAudioSessionOutputRoute_BuiltInSpeaker;
const CFStringRef kAudioSessionOutputRoute_USBAudio;
const CFStringRef kAudioSessionOutputRoute_HDMI;
const CFStringRef kAudioSessionOutputRoute_AirPlay;

I also see that iOS 5.0 supports a new property called kAudioSessionProperty_OutputDestination that is read/write:

kAudioSessionProperty_OutputDestination
A read/write CFNumberRef object that indicates the audio output destination, from a USB         audio accessory attached through the iPad camera connection kit, that you want to use.
The value must be one of the identifiers provided as a kAudioSession_OutputDestinationKey_ID key as part of the kAudioSessionProperty_OutputDestinations array.
Available in iOS 5.0 and later.

Questions:

  1. Is the property designed to let me force the output route?
  2. The docs mention a USB audio accessory. Will this work when no accessory is connected, or when a HDMI cable is connected?
  3. Is there any sample code showing how to set this property correctly?

Thanks!

0

There are 0 best solutions below