Acquiring input Data
Acquiring input Data
- Subject: Acquiring input Data
- From: Paul Barbot <email@hidden>
- Date: Thu, 16 Jun 2005 19:30:20 +0200
Hello,
I want to acquire data from input using the HAL and CoreAudio.
I followed the technote TN2091 (http://developer.apple.com/technotes/tn2002/
tn2091.html#top) but I all I have is an error -50 from the
AudioUnitRender. I have read on
this mailing list that its because there is a wrong parameter, often
the TimeStample but
because the AURender call is inside the Callback I cannot change it
(it is a const parameter).
Is it because I call the function in the bad order ?
here is an extract of my main function :
/* -------------main()-----------------------------------*/
OpenUnit();
err = SetDefaultInputDeviceAsCurrent();
if (err)
return 1;
UInt32 enableIO;
UInt32 size=0;
enableIO = 1;
AudioUnitSetProperty(InputUnit,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Input,
1, // input element
&enableIO,
sizeof(enableIO));
enableIO = 0;
AudioUnitSetProperty(InputUnit,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Output,
0, //output element
&enableIO,
sizeof(enableIO));
err = SetInputFormat();
if (err)
return 1;
if (MyInputCallbackSetup())
return 1;
err = InitAndStartAUHAL();
if (err)
return 1;
/*----------------main()--------------------------------*/
All the function are as there are defined in the technote.
Thanks
--
Paul Barbot
Cownitif : a voice commander
http://cownitif.free.fr
PS : excuse me if i made some english mistake !
_______________________________________________
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