SWIFT - Is it possible to save audio from AVAudioEngine, or from AudioPlayerNode? If yes, how?

后端 未结 2 673
孤城傲影
孤城傲影 2021-02-02 04:02

I\'ve been looking around Swift documentation to save an audio output from AVAudioEngine but I couldn\'t find any useful tip.
Any suggestion?

相关标签:
2条回答
  • 2021-02-02 04:36

    Yes, it's quite easy. You simply put a tap on a node and save the buffer into a file.

    Unfortunately this means you have to play through the node. I was hoping that AVAudioEngine would let me process one sound file into another directly, but apparently that's impossible - you have to play and process in real time.

    0 讨论(0)
  • 2021-02-02 04:42

    Offline rendering Worked for me using GenericOutput AudioUnit. Please check this link, I have done mixing two,three audios offline and combine it to a single file. Not the same scenario but it may help you for getting some idea. core audio offline rendering GenericOutput

    0 讨论(0)
提交回复
热议问题