Re: Setting a graph's sample rate
Re: Setting a graph's sample rate
- Subject: Re: Setting a graph's sample rate
- From: William Stewart <email@hidden>
- Date: Thu, 2 Mar 2006 11:04:31 -0800
On 02/03/2006, at 9:22 AM, Geoff Hufford wrote:
Are you changing the sample rate on the input scope or the output
scope? The difference is between changing the re-sampler in the
Output unit and changing the hardware itself (which might not support
the sample rate you want in the first place).
Thanks David. That does look like the first thing I was doing wrong.
I now set the kAudioUnitScope_Input of the OutputUnit to 48000
after the
graph and mixer nodes are connected but prior to AUGraphUpdate and
AUGraphInitialize. Incidentally it errors if I try to set the Input or
Output rate of the Mixer (I don’t know if I need to).
Prior to AUGraphInitialize, AudioUnitGetProperty (m_output,
kAudioUnitProperty_SampleRate, kAudioUnitScope_Input...) Is 48000.
After
AUGraphInitialize it is 44100. I am still missing something.
Yes.
What you need to do is this. Before you call AUGraphInitialize, go
through all of the nodes in the graph and set all of their outputs to
48000 (except of course the output unit, where you can't set the
hardware side's format).
So, then when you connect the graph up (this is one of the things
AUGraphInitialise will do for you), the source of a connection is
used to define the format of the connection. So, the formats you have
established at the output stages (48000) will then propogate through
to the input side of each connection.
Bill
Geoff
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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