• 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
audioqueue change sample rate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

audioqueue change sample rate


  • Subject: audioqueue change sample rate
  • From: Robert Carroll <email@hidden>
  • Date: Thu, 12 May 2011 14:49:27 -0400

Hi,

There have been occasional references to manipulating pitch in audioqueue playback by overwriting the sample rate.

I am trying to play two pitches in sequence with a calculated detuning (in cents) between them. From the examples I found this is supposed to work as long as a new audioqueue is created to handle the altered sample rate playback.

UInt32 size = sizeof(mDataFormat);
err = AudioFileGetProperty(mAudioFile, kAudioFilePropertyDataFormat, &size, &mDataFormat);
if (err != noErr)
NSLog(@"Couldn't determine the audio file format");
//mDataFormat is AudioStreamBasicDescription structure
Float64 mySampleRate = mDataFormat.mSampleRate;
NSLog(@"The sample rate is: %f", mySampleRate);
if (inRate != 1) {
NSLog(@"The sample rate should change.");
//mDataFormat.mSampleRate *= inRate;
mDataFormat.mSampleRate = inRate;
mySampleRate = mDataFormat.mSampleRate;
NSLog(@"The new sample rate is: %f", mySampleRate);


}

So far my version does not succeed in detuning the second audio sample.

Any suggestions would be greatly appreciated.

thanks,


Robert Carroll

RSM Records

Toronto

http://www.rsmrecords.com


 _______________________________________________
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: audioqueue change sample rate
      • From: tahome izwah <email@hidden>
  • Prev by Date: is xcode the preferred IDE for apple-oriented c++?
  • Next by Date: about audio unit callbacks, I am totally confused
  • Previous by thread: Re: is xcode the preferred IDE for apple-oriented c++?
  • Next by thread: Re: audioqueue change sample rate
  • Index(es):
    • Date
    • Thread