Re: audioqueue change sample rate
Re: audioqueue change sample rate
- Subject: Re: audioqueue change sample rate
- From: tahome izwah <email@hidden>
- Date: Fri, 13 May 2011 12:31:10 +0200
Not sure if this helps but the DiracLE SDK has a varispeed example in
the iOS realtime example folder: http://dirac.dspdimension.com
If you don't need full scale time stretching but just a SRC pitch
change you can simply use their EAFRead class which takes an output
sample rate parameter...
HTH
--th
2011/5/12 Robert Carroll <email@hidden>:
> 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
>
>
_______________________________________________
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