What is the difference between AVAudioSession sample rate and AVAudioEngine input node sample rate?
Asked Answered
P

0

8

I notice that AVAudioSession.sharedInstance().sampleRate is 48000, while AVAudioEngine().inputNode.inputFormat(forBus: 0) shows me a sample rate of 44100. When I do try AVAudioSession.sharedInstance().setPreferredSampleRate(16000) it sets the input node sample rate, not the session sample rate. So my question is, what's the difference between the two sample rates?

I am trying to live record speech audio at 16kHz, but the audio comes out sounding distorted and metallic. I was wondering if it had something to do with the mismatch of these sample rates.

Pyrrha answered 10/6, 2020 at 5:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.