• 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 21:51:45 -0600

You are exactly correct, I was still calling an AudioUnitRender on element 1. Taking that out, it is working correctly in every case, even if I leave in the kAudioOutputUnitProperty_EnableIO to enable the input.

thanks for the help!

Andrew Smith


On Wednesday, October 21, 2009, at 12:29PM, "Doug Wyatt" <email@hidden> wrote:
>I can't be more sure without looking at whatever inRenderProc is
>doing, but I think you must be trying to call AudioUnitRender on
>element/bus 1 when input is disabled. Don't do that; that's where mic
>(etc.) input arrives and you've disabled input. inRenderProc's
>responsibility is to provide the output samples. In some examples it
>does this by thru-ing the audio input. You want to simply give it some
>other audio, I assume, so don't do anything with bus 1.
>
>Doug
>
>On Oct 21, 2009, at 8:11 , Andrew Smith wrote:
>
>> 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

References: 
 >Re: AudioUnitRender returning -10863 if no input device is present (From: Andrew Smith <email@hidden>)
 >Re: AudioUnitRender returning -10863 if no input device is present (From: Doug Wyatt <email@hidden>)

  • Prev by Date: m4a metadata in AudioFile kAudioFilePropertyInfoDictionary
  • Next by Date: Audio Video sync with Core Audio Queue Services
  • Previous by thread: Re: AudioUnitRender returning -10863 if no input device is present
  • Next by thread: AudioDeviceStart Error Codes
  • Index(es):
    • Date
    • Thread