Is AVAudioPCMBuffer compressed? If not how to compress it?

342 Views Asked by At

I am using AVAudioEngine to record audio. The code looks like that:

  inputMixerNode.installTap(onBus: 0, bufferSize: 8192, format: outputFormat) {
      (audioPCMBuffer, audioTime) in
    try? audioFile.write(from: audioPCMBuffer)
  }

My question about the generated audioPCMBuffer is, is it compressed? If not, how to use AVAudioConverter to do the compression?

In addition, I found the generated audioFile must have suffix ".aac". Does that mean it is already compressed?

Thanks!

Q

0

There are 0 best solutions below