the_moon
the_moon

Reputation: 563

Available Input/output AVAudioSession data sources in iOS

I am using AVAudioSession and remote IO with the aim of record some info throught both the audio jack connector and the built-in mic... I guess it could be possible with the new feature of iOS 6: Multiroute audio.

In order to do that I would like to get the inputDataSources from my audio session: (https://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVAudioSession_ClassReference/Reference/Reference.html#//apple_ref/c/data/AVAudioSessionCategoryMultiRoute)

What I am doing is:

AVAudioSession *session = [AVAudioSession sharedInstance];
NSArray *available_outputs = [session inputDataSources];

(I am also configuring the audio session and activating it)

What I get is all zeros in available_outputs...

What am I doing wrong?

Upvotes: 3

Views: 2443

Answers (1)

Moshe Gottlieb
Moshe Gottlieb

Reputation: 4003

Found it.
From the documentation:

This currently only applies to certain USB devices.

This API is going to change in iOS 7, but 6 is limited to that obscure definition of "certain USB devices".
BTW, from my tests - it worked on iOS 6.02 for the iPhone microphone but not on 6.1.4 (both tests on iPhone 5).

Upvotes: 1

Related Questions