Re: Input rendering
Re: Input rendering
- Subject: Re: Input rendering
- From: Bill Farmer <email@hidden>
- Date: Tue, 26 Oct 2010 13:17:56 +0100
On 25/10/2010 19:15, Jeff Moore wrote:
On Oct 25, 2010, at 10:35 AM, Bill Farmer wrote:
Hi
I have ported a musical instrument tuner application from
windows. I have two queries concerning audio units:
I have set up microphone input using the AUHal audio unit
in accordance with Technical Note TN2091, which works fine.
However I would like to increase
the kAudioUnitProperty_MaximumFramesPerSlice from the default
value. I have done this, using AudioUnitSetProperty(), but
the AURenderCallback parameter inNumberFrames is always the
default value. Is this the expected behaviour, or am I missing
something?
In addition to
increasing kAudioUnitProperty_MaximumFramesPerSlice, you also
need to set kAudioDevicePropertyBufferFrameSize to tell the
underlying AudioDevice what buffer size you would like to use.
Note that you can set this directly on your instance of AUHAL,
as AUHAL proxies the underlying device's properties.
Thank you, that works fine, I had missed that one.
I would like to set up a chain of audio
units, an AUHal unit, a format converter, and a low pass filter.
I have tried setting up a chain both using the audio unit api,
and the AUGraph api. In both cases, I can't get the rendering
callback to work. Again is this expected, or am I missing
something?
You'll need to provide more detail before we can help with
this.
What I want to do is: Set up an AUHAL as per Technical Note TN2091
with the input device set to the default input device. Connect it's
output to the input of a format converter unit to downshift to a
sample rate of 11025 or 12000. Connect the output of the format
converter unit to the input of a low pass filter unit. Set up a
AURenderCallback on the output of the filter unit to process the
data.
I've tried this with just the AUHal unit and the format converter
unit as a test. It all appears to set up correctly with no errors
except that the render callback never gets called. I have assumed
this is due to the kAudioOutputUnitProperty_SetInputCallback
property being only applicable to an output unit. The
kAudioUnitProperty_SetRenderCallback appears to be for providing
input to an audio unit rather than collecting output.
--
Jeff Moore
Core Audio
Apple
Regards
Bill
_______________________________________________
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
|
_______________________________________________
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