In Swift you can set a set a recording format using:

let format = AVAudioFormat(commonFormat: AVAudioCommonFormat.pcmFormatInt16, sampleRate: hwSampleRate, channels: 1, interleaved: false)

I am struggling with how to do this in Objective C and autocomplete is not coming through either:

AVAudioFormat *newFormat = ??? 

(I need to create it in such a way as to set the sampleRate which is a readonly property.)

Related posts

Recent Viewed