★ TouchArcade needs your help. Click here to support us on Patreon.

changing sound frequency

11-03-2009, 06:03 PM
#1
Joined: Feb 2009
Location: the next whiskey bar
Posts: 5,549
changing sound frequency

is there any way to change the pitch of a sound as it's playing?
11-03-2009, 07:24 PM
#2
In OpenAL, there's a source attribute called AL_PITCH that you can modify.
11-03-2009, 09:16 PM
#3
Joined: Feb 2009
Location: the next whiskey bar
Posts: 5,549
I'm using an AVAudioPlayer to play the sound, would you mind elaborating on how I can use AL_PITCH to change the pitch?
11-04-2009, 02:06 AM
#4
You can't change the pitch with AVAudioPlayer, you need to use OpenAL which is a completely different audio API.
11-04-2009, 03:18 PM
#5
Joined: Feb 2009
Location: the next whiskey bar
Posts: 5,549
hmm I see
I'll go do more research on OpenAL then.
11-04-2009, 05:53 PM
#6
OpenAL is pretty standard and widely used. You can find a lot of information about it on the internet. I would suggest using that library if it suits you.

We tried FMOD in the past, but it seemed to be much more of a resource hog and we didn't like the licensing.

A ragdoll physics platformer:Flickitty
The artist: randall schleufer
Twitter: @FlickittyiPhone