• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iOS Bluetooth input, line or speaker output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iOS Bluetooth input, line or speaker output


  • Subject: iOS Bluetooth input, line or speaker output
  • From: Aran Mulholland <email@hidden>
  • Date: Fri, 25 Nov 2011 18:18:38 +1100

Hey List,

I know we seem a bit reserved when it comes to answers on bluetooth
but I thought I might run it past you after an entire day of crawling
the web and reading header files etc.

With the audio session one can use the
kAudioSessionProperty_OverrideCategoryEnableBluetoothInput to allow
the audio to play through and be input from a bluetooth headset. Is
there any way to only allow input from bluetooth and still output the
audio to the speaker or the headphone out? The property
kAudioSessionProperty_OverrideCategoryEnableBluetoothInput sounds like
it is just talking about input doesn't it? It's not.

I tried the "all new" Audio Session property
kAudioSessionProperty_OutputDestinations and then realised it was just
for usb (via camera kit) outputs. Pity.. this looks like the kind of
interface I want, a list of all available inputs and outputs and
routing left in the hands of the dev.

Code is below, maybe someone else will find it useful....

    //get all available output destination
    UInt32 size = sizeof(CFArrayRef);
    CFArrayRef audioOutputRoutes;

    OSStatus err =
AudioSessionGetProperty(kAudioSessionProperty_OutputDestinations,
&size, &audioOutputRoutes);

    if (err == noErr){
        CFIndex i, c = CFArrayGetCount(audioOutputRoutes);
        CFDictionaryRef audioOutput;

        for (i=0; i<c; i++) {
            audioOutput =
(CFDictionaryRef)CFArrayGetValueAtIndex(audioOutputRoutes, i);

            CFNumberRef routeId =
(CFNumberRef)CFDictionaryGetValue(audioOutput,
kAudioSession_OutputDestinationKey_ID);
            CFStringRef routeDescription =
(CFStringRef)CFDictionaryGetValue(audioOutput,
kAudioSession_OutputDestinationKey_Description);

        }
    }

Cheers

Aran.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Audio Unit with SideChain
  • Next by Date: Re: Preroll semantics & clarification of kAudioUnitProperty_OfflineRender
  • Previous by thread: Audio Unit with SideChain
  • Next by thread: What happened to MovieAudioExtractionRef
  • Index(es):
    • Date
    • Thread