S
S
Stanislav2018-10-14 14:51:36
iOS
Stanislav, 2018-10-14 14:51:36

What are the optimal settings for recording audio in iOS AVFoundation?

Tell me the optimal parameters for creating an audio recording in iOS AVFoundation and sending it to the server, followed by playback. There are 2 extreme options, the first takes up the most space on the server, but it also sounds good, the second is simple and produces a poor quality recording, but takes up very little space.
1st Embodiment:
AVFormatIDKey: kAudioFormatAppleLossless,
AVEncoderAudioQualityKey: AVAudioQuality.max.rawValue,
AVEncoderBitRateKey: 32000,
AVNumberOfChannelsKey: 2,
AVSampleRateKey: 44100.0
Embodiment 2nd:
AVFormatIDKey: Int (kAudioFormatMPEG4AAC),
AVSampleRateKey: 12000.0,
AVNumberOfChannelsKey: 1 as NSNumber,
AVEncoderAudioQualityKey: AVAudioQuality.high.rawValue

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question