1

How can I get the properties of an audio file (like the number of channels, sample rate and bit rate) programmatically in Objective-C for iOS?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
suse
  • 10,503
  • 23
  • 79
  • 113

1 Answers1

1

To get the properties for any audio filetype that is supported on iOS, load the audio data into an AVAudioPlayer and examine its properties (in particular, the settings dictionary).

一二三
  • 21,059
  • 11
  • 65
  • 74
  • Can this be used to read audio from the ipod library? looks like ony the AVPlayer class can be used for that. If I use AVAudioPlayer I can't play the file or get anything from the settings dictionary. – roocell Oct 08 '11 at 15:16