Re: Varispeed AU configuration with QT audio extraction?
Re: Varispeed AU configuration with QT audio extraction?
- Subject: Re: Varispeed AU configuration with QT audio extraction?
- From: William Stewart <email@hidden>
- Date: Mon, 27 Mar 2006 14:47:41 -0800
On 24/03/2006, at 4:53 PM, Ray Garcia wrote:
I've been gnashing my teeth over the problem of feeding data from a
QuickTime audio extraction session through an AU graph with an
output node and a varispeed node. I've had success directly driving
a default audio hardware component with a renderproc grabbing data
provided by an audio extraction session, but this appears to be
dependent on what the hardware capabilities are (e.g. feeding it a
22kHz sample gets rejected by a lot of newer hardware). Apple's
documentation is incomplete (read: infuriating) in its lack of
description of the AUs available (a page should be dedicated to
describing the inputs, outputs, and error conditions for each
component they provide IMHO), so I'm turning to the list in hopes
that someone will suggest a solution or resource for me to solve
this with.
The code I'm using is based loosely on the ComplexPlayThru example
program, which does a similar job, only it uses an AU connected to
an input device rather than an QT audio session..
Specifically, the assertion that fails is the setting of the stream
characteristics for the varispeed input side. The error is -10868,
aka kAudioUnitErr_FormatNotSupported.
Yes - so you are giving the varispeed a format it doesn't like.
asbdSession is the stream description for the audio being extracted
from QT, which is known to work when used to set the asbd of the
output device.
The output unit has a built in converter that can deal with
converting to/from formats that most AUs do NOT deal with. For
instance, the format you provide to the varispeed should be the
canonical AU format:
- lpcm
- float 32 (Native Endian)
- deinterleaved
The output AU can take:
- lpcm
- any bit depth (float or int)
- big or little endian
- interleaved or de-interleaved.
QT should by default I think be providing you the deinterleaved,
float 32 format - but you should check with them (ie. the QT API
list)... Have a look also at CAStreamBasicDescription in the CA SDK -
is has a SetCanonical method that can be used to set this format.
Is there another AU I need to be inserting inline before the
varispeed to do a format conversion (and why?)? Where is it
documented what formats the varispeed will accept as input?
In the AU documentation we do say discuss that AUs in general are
only expected (and must) deal with the canonical float 32
deinterleaved format.
Is there source code for the varispeed available so I can decipher
the errors that Apple vaguely hints at the cause of?
I think this error is quite explicit - bad format - you just don't
know what is expected of it (and given the current state of our docs,
I can sympathise with you).
Thanks in advance for any light that can be shed on this!
// check that we have matching channel counts
// if not, things get complex
AudioStreamBasicDescription asbdOutput;
UInt32 propertySize = sizeof(AudioStreamBasicDescription);
err = AudioUnitGetProperty(mOutputUnit,
kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0,
&asbdOutput, &propertySize);
This is the format the device is using - for built in audio, this
format is interleaved and should not (cannot) be used to deal
generically with AUs.
// set the input side of the varispeed to match the session
where does asbdSession come from - who sets that up?
Bill
--
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