AudioKit是否提供交叉淡入淡出的选项?我已经尝试过使用AKBooster淡入/淡出AKSequencer,但是我在运行中设置了变化的速度/速率,这使得何时开始淡入淡出变得复杂。 AKWaveTable提供了一个很棒的循环选项,但是我不确定是否有任何方法可以创建一个从其交叉淡入淡出的“软”循环。我希望对以下示例进行软循环:
import AudioKit
class ViewController: UIViewController {
let mixer = AKMixer()
let wavePlayer = AKWaveTable(file: (try! AKAudioFile(readFileName: "sample.mp3")), startPoint: Sample(44100), endPoint: Sample(44100), rate: 1, volume: 1, maximumSamples: 0, completionHandler: {}, loadCompletionHandler: {})
func play(){
wavePlayer.play()
}
override func viewDidLoad() {
wavePlayer >>> mixer
AudioKit.output = mixer
wavePlayer.loopEnabled = true
wavePlayer.play(from: Sample(44100))
do {
try AudioKit.start()
} catch {
AKLog("AudioKit did not start!")
}
play()
}
}
谢谢!