Re: My AUHAL Output Audio Unit
Re: My AUHAL Output Audio Unit
- Subject: Re: My AUHAL Output Audio Unit
- From: Doug Wyatt <email@hidden>
- Date: Fri, 25 Jun 2004 13:10:03 -0700
I have a command-line tool that uses the AUHAL for input -- it records
4 of the 12 streams on my MOTU 828mk2.
The source probably isn't fit for public consumption, but in
pseudo-code:
open input unit
set unit's enableIO=1, input scope, element 1
set unit's device to desired device
set SetInputCallback
get stream format (input scope, element 1) - store into hardwareFormat
this should have the same number of channels as all of the device's
streams, summed
std::vector<SInt32> channelmap;
for every stereo pair to be recorded:
create an audio file
for the two device channels to be recorded:
channelmap.push_back(channel)
int totalRecordChannels = channelmap.size()
CAStreamBasicDescription inputFormat;
inputFormat.SetCanonical(totalRecordChannels, false); // deinterleaved
inputFormat.mSampleRate = hardwareFormat.mSampleRate;
set stream format on output scope, element 1 to inputFormat
set channel map on output scope element 1, to channelmap
mInputBufPtrs = AudioBufferList with totalRecordChannels buffers
start
on input:
AudioUnitRender(input unit, bus 1) into mInputBufPtrs
.....
works ...
Doug
On Jun 25, 2004, at 11:28, Robert Grant wrote:
Bill,
Sorry to hijack this thread - but it is related....
Airy and I are having a hard time getting the AUHAL to provide more
than two buffers on input regardless of the channelMap settings. Airy
(his Tascam has four input channels) and I (using the 16 channel
SoundFlower device) are getting only 2 channels/buffers returned from
AudioUnitRender and that's with completely separate implementations.
Can you confirm that > 2 channel input is working with the AUHAL?
Thanks,
Robert.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.