Re: My entire problem(s)?
Re: My entire problem(s)?
- Subject: Re: My entire problem(s)?
- From: William Stewart <email@hidden>
- Date: Mon, 14 Jun 2004 12:02:34 -0700
At the risk of being really inane...
Have you guys looked through the Tech Note that explains how to use the
AUHAL AU as an input unit (the tech note is available from a link at
http://developer.apple.com/audio) - don't yell at me if you have! But,
if you have and it hasn't helped you, please let us know what it is
missing (I believe there's also code there that is quotes that should
run)
If not we will fix this - possibly we should ammend the example to do
this (both doing a direct software play-thru, as well as an option to
insert an effect between in and out)
Bill
On 14/06/2004, at 10:00 AM, Chilton Webb wrote:
>
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,kAudio
>
UnitScope_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,&device
>
ID, 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.
>
>
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________
__
_______________________________________________
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.