1

I have an audio(voice) file where I want to apply filters (pitch shift for example and others effects), and I wanted to know with ios what is the best way to do it.

I just want open the file, apply effects and write to another file, no need to listen it. I saw the AUGraph, and Mixerhost sample, but do I really need to use AUGraph in my case, I don't listen from mic or listen the audio file.

And I saw in apple doc that "Every audio processing graph has one I/O unit"

Could you please help me ? Thanks in advance.

mamdouh alramadan
  • 8,349
  • 6
  • 36
  • 53
BenZ
  • 23
  • 2

1 Answers1

1

You certainly don't need to use Audio Units for this. Instead, everything you want to do can be achieved with Extended Audio File Services, combined with whatever DSP code you want to use for your effects.

Read the source code of TPAACAudioConverter. Its purpose is to convert compressed audio files from a source format (such as MP3) to AAC, but it contains all of the pieces necessary for reading samples from one file and writing them into another, regardless of source or destination format (you'll just need to fix up the destination ASBD to correspond to your desired output format).

In between the calls to ExtAudioFileRead and ExtAudioFileWrite, you can process the samples in the buffer by handing them off to your effect code.

warrenm
  • 31,094
  • 6
  • 92
  • 116
  • Thank you for your help, and explanation ! I will have a look at TPAACAudioConverter, thanks again – BenZ Jan 02 '13 at 18:59