Re: Change pitch during audio queue playback
Re: Change pitch during audio queue playback
- Subject: Re: Change pitch during audio queue playback
- From: Sebastian Morsch <email@hidden>
- Date: Wed, 20 May 2009 17:45:05 +0200
Hi Tony, thanks for answering!
No, I can't do pitch-shifting, I need pitch and speed to change
simultaneously.
But my main problem is that I'm new to core audio and its concepts
(coming from cocoa) and that I don't know what strategy is best to
achieve my goal. The options might be:
a) manipulating PCM data in the callback before calling
AudioQueueEnqueueBuffer (problem: I have to decode the audio first)
b) changing the sample rate the audio queue is operating with (is it
possible *while* the aq is playing?)
c) a completely different strategy my newbish mind doesn't know about...
Am 20.05.2009 um 16:36 schrieb Tony Sheng:
Have you think about keep sampling rate constant but apply a pitch
shifting method? You can easily find this algorithms by google pitch
shift algorithms .
Tony
-----Original Message-----
From: Sebastian Morsch <email@hidden>
Sent: Wednesday, 20 May 2009 1:49 PM
To: email@hidden
Subject: Change pitch during audio queue playback
Dear list,
I'm new to audio programming, but thanks to Apple's tutorial on audio
queues I was able to implement playback of audio files quite easily,
which is really great!
But now i have to leave the secure area of the tutorial as I try to
create a "pitch slider", that changes the pitch (just the sample rate,
no pitch-shifting!) during playback of my audio files. Pretty much
like on a DJ's turntable, only with a wider range.
I managed to change the pitch of an audio file's playback *before* the
audio queue is created by simply changing the sample rate in
AudioStreamBasicDescription. But that doesn't seem to work during
playback.
Can anyone give me a hint on how to do that while an audio queue is
playing? Do I have to pre-process the raw PCM data by "really
converting" it's sample rate in the callback? That would be hard for
me because I would probably have to do the decoding of compressed
audio myself. The fact that audio queues eat compressed packets is
what makes it so attractive for newbies like me.
Any help on this is very much appreciated. Thank you!
Sebastian
_______________________________________________
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