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

后端 未结 2 675
孤城傲影
孤城傲影 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.

提交回复
热议问题