Is it possible to phase shift audio in real time on the iPhone?
I have a simple application set up that outputs the audio from the microphone in real time. What I am trying to do is process this audio i.e. Do a phase shift.
Am I correct the only way to proceed is to take my sample space, do a FFT, phase shift, and then inverse fft?
I am aware of the vDSP library but it seems like too much overhead for a simple task.
UPDATE: I have a grounding in DSP from Elec Eng, and yes I really do want to do a phase shift. I do not need to do a freq shift or filter, they are seperate process’s I will later implement.
Yep, that’s a way to do it.
This sample C code shows it:
Output:
You can see that the output is a replica of the input shifted by
SAMPLE_SHIFTsamples (3, here) in time.You can change
SAMPLE_SHIFTto a non-integer value too, getting a shift by a fractional number of samples.Output for
SAMPLE_SHIFT= 2.5: