• 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
Re: AudioUnitRender returning -10863 if no input device is present
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioUnitRender returning -10863 if no input device is present


  • Subject: Re: AudioUnitRender returning -10863 if no input device is present
  • From: Andrew Smith <email@hidden>
  • Date: Wed, 21 Oct 2009 09:11:58 -0600

I'm still not getting this to work. I removed the  kAudioOutputUnitProperty_EnableIO enable input, but I still get the same errors in the callback. I also tried explicitly disabling the input, no luck.

Here is my setupRemoteIO code:

		// Open the output unit
		AudioComponentDescription desc;
		desc.componentType = kAudioUnitType_Output;
		desc.componentSubType = kAudioUnitSubType_RemoteIO;
		desc.componentManufacturer = kAudioUnitManufacturer_Apple;
		desc.componentFlags = 0;
		desc.componentFlagsMask = 0;

		AudioComponent comp = AudioComponentFindNext(NULL, &desc);

		XThrowIfError(AudioComponentInstanceNew(comp, &inRemoteIOUnit), "couldn't open the remote I/O unit");

		UInt32 one = 1;
//		XThrowIfError(AudioUnitSetProperty(inRemoteIOUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, &one, sizeof(one)), "couldn't enable input on the remote I/O unit");

		XThrowIfError(AudioUnitSetProperty(inRemoteIOUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &inRenderProc, sizeof(inRenderProc)), "couldn't set remote i/o render callback");

		UInt32 size = sizeof(outFormat);
		XThrowIfError(AudioUnitGetProperty(inRemoteIOUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &outFormat, &size), "couldn't get the remote I/O unit's output client format");

		outFormat.mSampleRate= auSampleRate;
		outFormat.mFormatID= kAudioFormatLinearPCM;
		outFormat.mFormatFlags= kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
		outFormat.mFramesPerPacket= 1;
		outFormat.mChannelsPerFrame= 2;
		outFormat.mBitsPerChannel= 16;
		outFormat.mBytesPerPacket= 4;
		outFormat.mBytesPerFrame= 4;


		XThrowIfError(AudioUnitSetProperty(inRemoteIOUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &outFormat, sizeof(outFormat)), "couldn't set the remote I/O unit's input client format");

		XThrowIfError(AudioUnitSetProperty(inRemoteIOUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 1, &outFormat, sizeof(outFormat)), "couldn't set the remote I/O unit's input client format");

		XThrowIfError(AudioUnitInitialize(inRemoteIOUnit), "couldn't initialize the remote I/O unit");
//		NSLog(@"AudioUnitInitialize succeeds");


On Thursday, October 15, 2009, at 11:47AM, "Doug Wyatt" <email@hidden> wrote:
>When there's no input device present, you have to disable the input
>side of AURemoteIO via kAudioOutputUnitProperty_EnableIO. If the mic
>availability changes on a Touch and you want to change the enabledness
>of input on a unit you've already initialized, you'll hit an issue --
>avoid it by disposing the AURemoteIO and creating a new one.
>
>Doug
>
>On Oct 14, 2009, at 20:11 , Andrew Smith wrote:
>> Hi
>>
>> In my audio processing tools I normally use a RemoteIO setup that
>> lets me read in the input buffer, and stuff in values that end up in
>> the audio output. I do have one output-only function, but if it's on
>> a Touch with no mic plugged in, my performThru functions gest -10863
>> when it calls AudioUnitRender.
>>
>> Is there any way that I can still get my data into the output
>> without an input device being present?
>>
>> thanks!
>> Andrew Smith
>
>
>
>
 _______________________________________________
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

  • Follow-Ups:
    • Re: AudioUnitRender returning -10863 if no input device is present
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: Contradiction in the core audio queue services API
  • Next by Date: Re: Aggregate device question
  • Previous by thread: Re: AudioUnitRender returning -10863 if no input device is present
  • Next by thread: Re: AudioUnitRender returning -10863 if no input device is present
  • Index(es):
    • Date
    • Thread