iphone - What is kAudioSessionProperty_InputSources actually good for? -


i've tried fetch list of available audio input devices on iphone using code:

cfarrayref arrayref; uint32 size = sizeof(arrayref); osstatus status = audiosessiongetproperty(kaudiosessionproperty_inputsources, &size, &arrayref); assert(status == noerr); nsarray *array = (__bridge nsarray *)arrayref; 

the call works , returns without error, results array empty, no matter hardware have connected it. i've tried 2 usual headsets mobiles, original 1 apple , 1 samsung , 2 kinds of usb microphones (an ixy rode , im2x tascam), array stays empty. wonder kinds of input sources listed property? usable @ all?

by using listener callback on audio routes, able verify 4 devices detected correctly. able record audio each of devices, work properly. use iphone 4s ios 6.1.3 (10b329).

i'm new audio programming on iphones don't have answer question of particular property for, if want list of audio inputs, think work:

nsarray * ais = [[avaudiosession sharedinstance] availableinputs]; 

this provides array of avaudiosessionportdescription objects.

for (id object in ais) {     avaudiosessionportdescription * pd = (avaudiosessionportdescription*)object;     nslog(@"%@",pd.portname); } 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -