1

Does anyone know if it is possible to convert a sound file in the Documents directory from within an app? I have a recorded sound file that will be available in iTunes File Sharing that I need to convert. Is afconvert available from within iOS?

Thanks

chmod
  • 1,173
  • 1
  • 9
  • 17

2 Answers2

0

I'm not sure from what format to what format you want to convert to, but converting audio during runtime is not as simple as the command-line afconvert tool.

Check out Apple's sample projects iPhoneACFileConvertTest or ConvertFile. I think these would be good starting points if you want to convert audio in your app.

pmwood
  • 741
  • 5
  • 15
  • This suggestion led me to the iPhoneExtAudioFileConvertTest sample project which is exactly what I needed for my project (Needed to be able to change the sampling rate of a file). – chmod Apr 24 '12 at 04:03
0

For what it's worth, afconvert is just a handy command-line interface to the features of the ExtAudioFile API which you can find in -- Using this API you can convert from any supported file format/audio format combination TO any supported file format/audio format combination.

Art Gillespie
  • 8,747
  • 1
  • 37
  • 34