My entire problem(s)?
My entire problem(s)?
- Subject: My entire problem(s)?
- From: Chilton Webb <email@hidden>
- Date: Mon, 14 Jun 2004 12:00:11 -0500
Hi,
I think I'm missing something obvious.
I am trying to create a generic method of playing 44khz audio sources
through an audio unit filter, and then back out the speakers on my
PowerBook.
Right now, I'm...
1) Finding the correct audio unit for my filter and initializing it.
2) Finding the correct audio unit for the HALOutput, and initializing
two instances of it, like so...
err = OpenAComponent(comp, &InputUnit);
err = OpenAComponent(comp, &OutputUnit);
3) Enabling IO on the input element of my InputUnit, and disabling it
on the output element, while disabling the output element on the
inputUnit, and enabling it on the output element of my Output Unit,
like so...
err =
AudioUnitSetProperty(InputUnit,kAudioOutputUnitProperty_EnableIO,kAudioU
nitScope_Input,1,&enableIO, sizeof(enableIO));
(repeated 3 more times with enableIO set to 1 or 0, and changing the
unit in question).
4) Creating a connection between my filter AU and the input, like so...
struct AudioUnitConnection connection;
connection.sourceAudioUnit = InputUnit;
connection.sourceOutputNumber = 1;
connection.destInputNumber = 0;
err = AudioUnitSetProperty(delayUnit,
kAudioUnitProperty_MakeConnection,
kAudioUnitScope_Input,
0,
&connection,
sizeof(connection));
5) Setting the input and output devices to the current defaults using...
err = AudioHardwareGetProperty(
kAudioHardwarePropertyDefaultInputDevice, &count, (void *) &deviceID);
if (err==noErr) err = AudioUnitSetProperty(InputUnit,
kAudioOutputUnitProperty_CurrentDevice,kAudioUnitScope_Global,0,&deviceI
D, sizeof(deviceID));
(repeated for the input device, swapping out the InputUnit and
OutputUnit)
6) Setting an input proc like this...
err= AudioUnitRender(InputUnit,ioActionFlags,inTimeStamp,
inBusNumber, inNumberFrames, theBufferList);
7) Firing up the input and output units like so...
err = AudioUnitInitialize(InputUnit);
err = AudioUnitInitialize(OutputUnit);
err = AudioOutputUnitStart(InputUnit);
err = AudioOutputUnitStart(OutputUnit);
... now, for some reason(s), this isn't working. Audio doesn't move
through from mic to speaker. But the err is never anything other than
noErr. Am I missing something obvious? Doing something obviously wrong?
Thank you,
-Chilton (who is currently quite stumped)
_______________________________________________
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.