Re: AUAudioFilePlayer + AUTImePitch in AUGraph problems
Re: AUAudioFilePlayer + AUTImePitch in AUGraph problems
- Subject: Re: AUAudioFilePlayer + AUTImePitch in AUGraph problems
- From: William Stewart <email@hidden>
- Date: Thu, 23 Mar 2006 10:58:32 -0800
On 22/03/2006, at 7:01 PM, mantis wrote:
Hi,
I'm using an AUTimePitch unit within an AUGraph, and seeing some
anomalous behavior which I can't resolve.
Essentially the issue is that if I connect the AUTimePitch
anywhere except at the tail of the graph, the unit produces NO
audio output/ throughput if its 'kAudioUnitProperty_RenderQuality'
is set to 'kRenderQuality_Low' .
Some examples: if I set up an AUGraph thus:
DefaultOutputUnit <- AUTimePitch <- (connect AudioFilePlayID)
I can set the AUTimePitch to 'Low' renderQuality and have
'acceptable' sound output on an iBook G3 600 with about 15% cpu
utilisation. If, however, I set up the AUGraph thus:
DefaultOutputUnit <- AUTimePitch <- AUAudioFilePlayer
at 'Low' renderQuality there is no sound output at all, while at
'Medium' I get very choppy sound output and +100% CPU utilisation.
So using 'Medium' render quality is not an option this class of
machine... my old G4 400 only sweats at 20% or so on the same
setting so I guess it's a G3 thing. Anyhow, I want to be able to
support older machines, so being able to run AUTimePitch at 'Low'
is essential.
I know it is possible to run both AUTimePitch and AUAudioFilePlayer
within an AUGraph AND produce acceptable sound output if the
AUTimePitch renderQuality is set to 'Low', as this same setup in
AULab works fine on that same iBook, and produces CPU loads similar
to what my own code achieves using an AudioPilePlayID to connect to
a tail-end AUTimePitch.
I initially suspected the problem might be due to both AUTimePitch
and AUAudioFilePlayer having internal AudioConverters, and that the
signal was being 'converted' in both units, so I did a bunch of
experiments with CAAudioFile to attempt to match the formats and
sample-rates of the TimePitch input & FilePlayer AU output, all of
which produced no discernable dfference. Both units are set to the
same sample rates, have matched input & ouput formats etc. Every
connection from the AUFilePlayer output up to the OutputUnit input
is deinterleaved lcpm @41000 Hz.
But then I observed that the same symptoms present if I make any
sort of 'longer' graph with more units, where the AUTimePitch is
not at the tail of the graph, e.g:
DefaultOutputUnit <- (any effect AU's / mixers) <- AUTimePitch <-
(any effect AU's) <- (connect AudioFilePlayID or use
AUAudioFilePlayer)
Can anyone shed some light on what has to be done to get these
units to cooperate within an AUGraph, without needing to run the
AUTimePitch at 'Medium' or higher renderQuality? What voodoo goes
on in AULab when connecting the units that gets around this problem?
I think you probably need to be a bit more careful about the
management of the state of your graph. Try a similar configuration
as above in AULab, then do a Print (from the Debug menu) and have a
look at both the state of the connections, their formats, etc... You
will notice that the graph is all being run at the same sample rate -
the sample rate of the device. The second thing to look at is your
handling of Max Frames - in AULab we set this up to be the I/O buffer
size (as a way to save memory). You could double this number if you
are mainly going to use the AUTP and FilePlayers as this will be a
little more efficient.
Finally, I guess you are using the Graph's CPULoad calls to determine
the loads you are seeing? Do you have a listener for overloads on the
device, so you can detect when you miss your deadlines? These are all
things AULab does
Bill
Regards,
Mark Hill
xonko interactive
http://www.xonko.com
_______________________________________________
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