1

I'm trying to record with Audio Unit in iOS.
I set componentSubType in AudioComponentDescription to kAudioUnitSubType_VoiceProcessingIO.
Then both of AudioUnitInitialize and AudioOutputUnitStart's error code is 1852008051('ncfs').
I cannot find this error code in the document.
But when I turn kAudioUnitSubType_VoiceProcessingIO to kAudioUnitSubType_RemoteIO, everything is just fine.
Could anyone tell me what should be modified when changing from VoiceProcessingIO to RemoteIO?

Kyle_at_QP
  • 153
  • 1
  • 1
  • 7
Wot
  • 102
  • 11
  • I had some issues when switching to `kAudioUnitSubType_VoiceProcessingIO`, see my self-answered SO post http://stackoverflow.com/questions/12821404/apples-voice-processing-audio-unit-kaudiounitsubtype-voiceprocessingio-brok/12856322#12856322 – robbie_c Mar 25 '13 at 14:49

1 Answers1

0

If you are wanting to record from the device, then you need to use the remote IO component subtype, and then set this property:

UInt32 flag = 1;
AudioUnitSetProperty(yourAudioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, &flag, sizeof(flag));

You also might find this tutorial about use of remote IO audio units helpful.

Nik Reiman
  • 39,067
  • 29
  • 104
  • 160