tags:

views:

19

answers:

1

This is similar to The Pitch Shift question, except I want to keep my audio at the same pitch, but play it slower or faster -- time shift it. (On the iPhone.)

Can anyone point me to a library, tutorial or other reading to help with that?

Thanks!

A: 

Isn't this essentially the same thing? For example, if you pitch-shift something up an octave, then play it back at half speed, then it will play at the original pitch, but last twice as long...

psmears
Right. The question is: how to play it back at half speed. "Just modify the sound samples" isn't a detailed enough answer for me to follow what needs to be done.
Olie
@Olie - I didn't say "Just modify the sound samples" :-) How to change the playback rate depends on what API you're using to play the audio, but if you're using one that uses the `AudioStreamBasicDescription` structure, you may be able to modify the `mSampleRate` element to adjust the playback rate. Have you tried out any of the solutions from the "Pitch Shift" question yet? Which API did you use to play the sounds?
psmears
@psmears: Ah, yes -- sorry, I didn't mean to imply that you said that, only that it's a common theme in other answers I've seen, and I'm not quite up to the level of being able to interpret that sort of glossing-over.I'm not currently tied to any particular playback mechanism, as tempo-shifting is a necessary component. I'll investigate the AudioStream stuff.To the answer you gave: "If you pitch shift something up an octave" -- how? "...then play it back at half speed" -- how? That's what I was getting at.Thanks!
Olie