• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reduce Audio Time Latency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Reduce Audio Time Latency
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Audio File Services won't open some SDII files
  • Next by Date: Question about mono/stereo handling in AUs
  • Previous by thread: Splitter Unit
  • Next by thread: Re: Reduce Audio Time Latency
  • Index(es):
    • Date
    • Thread