Re: Limitations on DefaultOutput unit format converter?
Re: Limitations on DefaultOutput unit format converter?
- Subject: Re: Limitations on DefaultOutput unit format converter?
- From: William Stewart <email@hidden>
- Date: Fri, 16 Oct 2009 12:56:44 -0700
I think what you are seeing is a max frames error.
Every audio unit has a max frames limit which is the maximum number of
frames that you can render at a given time. In the examples below, the
ones that don't work all have a conversion ratio that is quite high.
Converting 196k to 44.1k is a 4.44 ratio, so 512 samples * 4.44 is
approx 2275.5 samples. For the default setting this is too many
samples, so the varispeed will be giving a max frames error on its
call to AudioUnitRender, and so will be silent.
So, to fix this on the varispeed AU, you should set MaxFramesPerSlice
to be big enough to handle the IO request the output unit will make on
it (in the case above, I would set this to 2280)
I don't know why the 176.4kHz case is failing though, but if you fix
the above, I suspect that will work as well.
Bill
On Oct 16, 2009, at 8:36 AM, Christopher Liscio wrote:
I have an AU graph which doesn't want to play any audio in certain
cases. I thought I localized the issue to when you're feeding audio
sampled above 96kHz into a DefaultOutput unit that is set to a
sample rate below 96kHz on its output scope, but some random testing
on my part appears to tell a more complex story.
Here are some scenarios, with ASBDs for the Input/Output scopes of
the DefaultOutput unit.
Works (Built-In Output):
inasbd 1ch-96000.00hz-32bit-'mcpl' floating-point little-endian packed
outasbd 2ch-44100.00hz-32bit-'mcpl'
Doesn't work (Built-In Output):
inasbd 1ch-176400.00hz-32bit-'mcpl' floating-point little-endian
packed
outasbd 2ch-44100.00hz-32bit-'mcpl'
Works (MOTU Traveler):
inasbd 1ch-44100.00hz-32bit-'mcpl' floating-point little-endian packed
outasbd 22ch-44100.00hz-32bit-'mcpl' floating-point little-endian
packed
Doesn't work (MOTU Traveler):
inasbd 1ch-192000.00hz-32bit-'mcpl' floating-point little-endian
packed
outasbd 22ch-44100.00hz-32bit-'mcpl' floating-point little-endian
packed
Works (MOTU Traveler):
inasbd 1ch-192000.00hz-32bit-'mcpl' floating-point little-endian
packed
outasbd 8ch-192000.00hz-32bit-'mcpl'
Doesn't Work (MOTU Traveler, odd because sample rates match):
inasbd 1ch-176400.00hz-32bit-'mcpl' floating-point little-endian
packed
outasbd 8ch-176400.00hz-32bit-'mcpl'
When I say "Doesn't work", I mean:
* AUGraphStart( mGraph ) returns noErr.
* My render callback that's attached to the varispeed unit (see
below) doesn't get called.
The graph looks like this, for the last scenario above (they're all
the same, save for the sample rate):
AudioUnitGraph 0xD5C015:
Member Nodes:
node 1: 'aufc' 'vari' 'appl', instance 0x810014 O
node 2: 'auou' 'def ' 'appl', instance 0x810015 O
Connections:
node 1 bus 0 => node 2 bus 0 [1 ch, 176400 Hz]
CurrentState:
mLastUpdateError=0, eventsToProcess=F, isRunning=F
So are there known limitations to what the DefaultOutput unit will
and will not do in terms of a sample rate conversion? Should I
instead be placing a format converter unit earlier in the output
chain under some condition?
(PS: This is not the same app as the last issue I posted here. I'm
trying to tackle two separate issues at once. :P)
Thanks,
Chris Liscio
http://supermegaultragroovy.com
Learn _your_ music with Capo: http://capoapp.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
_______________________________________________
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