Re: Capturing AU output to file
Re: Capturing AU output to file
- Subject: Re: Capturing AU output to file
- From: Jeff Evans <email@hidden>
- Date: Fri, 10 Apr 2009 14:34:07 -0700
Thanks, Doug - though as you say, AudioUnitGetProperty is used to fill
in the ASBD based on the characteristics of the synth, which is the
DLS synth. Then that ASBD is applied to the external file using
ExtAudioFileSetProperty. The sample code doesn't include any other way
of setting the output format, aside from specifying the type (WAVE,
AIFF, CAF, etc.). I don't see why this sample code would work, given
what you say below. Actually I have no proof that the sample code
does work, I suppose.
In any event I've tried specifying CAF file output too, but
ExtAudioFileCreateNew still fails with the unsupported format error
with the ASBD filled out as per the sample code. Is the sample code
missing some way to set up a separate ASBD for the output file?
I'm way out of sight of land, here.
Jeff
On Apr 10, 2009, at 2:13 PM, Doug Wyatt wrote:
The AudioStreamBasicDescription you're passing to the
CAAudioUnitOutputCapturer isn't an acceptable data format for the file
format you've specified.
The ultimately lazy solution would be to specify the creation of CAF
file since it can contain anything :-)
Otherwise, you probably want to specify a big-endian 16-bit integer
format for AIFF, little-endian for WAV, etc.
Notice how in Start() the code helpfully fetches the AU's output
stream format and makes that the ExtAudioFile's client format, so you
don't have to be concerned about that format (which is likely AU
canonical).
hth,
Doug
On Apr 10, 2009, at 13:05 , Jeff Evans wrote:
Hi -
I'm trying to use the CAAudioUnitOutputCapturer sample code to
capture output from the DLS synth, and I can't get past an
'unsupported format' error at ExtAudioFileCreateNew. The format
argument seems to be properly initialized using AudioUnitGetProperty
on the synth, but I see the formatID is 'lpcm' - is
ExtAudioFileCreateNew just unable to accept that format? For output
file formats I've tried kAudioFileWAVEType, kAudioFileAIFFType, etc.
but now I wonder: does the output capturer just not work with the
built-in DLS synth?
I have a feeling this will end up being a dumb question - I had
assumed that the capturer would convert output on the fly to the
specified audio file format - am I mixed up?
Jeff
--
If this email is spam, report it here:
http://www.onlymyemail.com/view/?action=reportSpam&Id=MTAxOTYyOjg3NjgxMjg4MTpqZXZhbnNAYXJzLW5vdmEuY29t
_______________________________________________
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