Re: Reduce Audio Time Latency
Re: Reduce Audio Time Latency
- Subject: Re: Reduce Audio Time Latency
- From: Ravneet Kaur <email@hidden>
- Date: Fri, 25 Sep 2009 12:09:26 +0530
Hi
I am working on CoreAudio API to play an audio file(.wav) and change the frequency and volume of the sound file based on the value specified by the user.
I am using the following two API:
AudioUnitSetParameter(*theUnit, kAudioUnitParameterUnit_Hertz, kAudioUnitScope_Output, 0, (Float32)100, 0);
AudioUnitSetParameter(*theUnit, kAudioUnitParameterUnit_LinearGain, kAudioUnitScope_Output, 0, (Float32)90, 0);
I can verify the volume changes but can not figure out the frequency changes. The following section of code is used to retrieve the value of frequency and volume after setting.
Float32 lVol;
Float32 *lVolPtr = &lVol;
AudioUnitGetParameter(*theUnit, kAudioUnitParameterUnit_LinearGain, kAudioUnitScope_Output, 0, lVolPtr);
float value = *lVolPtr;
NSLog(@"volume value - = %f ", value);
Float32 lVol2;
Float32 *lVolPtr2 = &lVol2;
AudioUnitGetParameter(*theUnit, kAudioUnitParameterUnit_Hertz, kAudioUnitScope_Output, 0, lVolPtr2);
float value2 = *lVolPtr2;
NSLog(@"freaquency value - = %f ", value2);
Even console logs are not helping.I am posting the console logs along with.
Sep 25 11:54:55 oxdelaps Python[5018]: volume value - = 90.000000
Sep 25 11:54:55 oxdelaps Python[5018]: freaquency value - = 0.000000
Sep 25 11:54:55 oxdelaps Python[5018]: <++++++++++ inside cleanup &&&&&&&&&&&&
Sep 25 11:54:56 oxdelaps Python[5018]: ========================== before setting parameter========================== before setting parameter
Sep 25 11:54:56 oxdelaps Python[5018]: <========================== result after setting freaquency = -10878
Sep 25 11:54:56 oxdelaps Python[5018]: <========================== result after setting volume = 0
Sep 25 11:54:56 oxdelaps Python[5018]: volume value - = 90.000000
Sep 25 11:54:56 oxdelaps Python[5018]: freaquency value - = 0.000000
Sep 25 11:54:56 oxdelaps Python[5018]: <++++++++++ inside cleanup &&&&&&&&&&&&
Can someone please help me in verifying the API which I am using.
Best Regards
_______________________________________________
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