I worked out a demo of AUNewTimePitch to show at CocoaConf this week, I'll post it on my blog afterwards (ping me to repost here if I forget?). It seems like the range for playback rate is power-of-2 speedups or slowdowns. So you can play as slow as 1/32-time (1 second of source time equals 32 seconds of playback time, I guess?) to 32-time (32 seconds of source time equals 1 second of playback time).
To demo this, I put it on a slider that uses an exponential scale with a range of 0 to 10 that does powers of 2: 1/32, 1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, 16, 32. Otherwise, it's too touchy for the negative powers. Anyway, it's fun to play with.
Thing to note is that rate changes will consume data faster or slower than realtime. There's a property or a flag or something available for render callbacks to negotiate how many samples to provide. To keep it simple, I'm just demoing with an AUFilePlayer. I'm not sure it would make sense to, say, rate change the mic input. Pitch change doesn't have this problem, so I'm using the mic for that demo.
Crap, this turned into an ad for CocoaConf didn't it? Sorry about that. Anyways, hope that helps with the value of the parameter. If not, wait a week and I'll post my code and you can play with it.
-Chris Sent from my iPad
On Oct 20, 2012, at 4:48 PM, Andy Davidson < email@hidden> wrote: Hi
I started playing around with the new AUNewTimePitch in IOS 6. There does not seem to be much documentation. I found the following in AudioUnitParameters.h
I am not sure how to interpret the parameter range comments. For example what does 1/32 - > 32, 1.0 Mean?
Any idea what kNewTimePitchParam_Overlap and kNewTimePitchParam_EnablePeakLocking do?
Thanks in advance
Andy
// Parameters for AUNewTimePitch enum { // Global, rate, 1/32 -> 32.0, 1.0 kNewTimePitchParam_Rate = 0,
// Global, Cents, -2400 -> 2400, 1.0 kNewTimePitchParam_Pitch = 1,
// Global, generic, 3.0 -> 32.0, 8.0 kNewTimePitchParam_Overlap = 4,
// Global, Boolean, 0->1, 1 kNewTimePitchParam_EnablePeakLocking = 6 };
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
|