AudioKit export file with Filters

Deadly 提交于 2020-01-05 05:46:08

问题


i want to override an existing .m4a file with many filters with audio kit, my code :

file = try AKAudioFile(forReading: recordVoiceURL)
        player =  AKPlayer(audioFile: file)

        delay = AKVariableDelay(player)
        delay.rampTime = 0.5
        delayMixer = AKDryWetMixer(player, delay)

        reverb = AKCostelloReverb(delayMixer)
        reverbMixer = AKDryWetMixer(delayMixer, reverb)
        booster = AKBooster(reverbMixer)
        tracker = AKAmplitudeTracker(booster)
        AudioKit.output = tracker
        try AudioKit.start()

i am changing the values of my filters and it works perfectly , now i need to export a new file which include my original file + the EQ filters applied but i don't know how with AudioKit or with AVFoundation

Thanks to all


回答1:


Try AudioKit's renderToFile once you have your filters setup:

https://github.com/AudioKit/AudioKit/blob/79cebe3ff8acc64e743b9e9536693c193e478eb4/AudioKit/Common/Internals/AVAudioEngine%2BExtensions.swift#L24



来源:https://stackoverflow.com/questions/52633424/audiokit-export-file-with-filters

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!