Permalink
Browse files

Fix: exportAsynchronously error

exportAsynchronously failure with error "AKAudioFile export: In time must be less than Out time."
  • Loading branch information...
RockerHX committed Jul 18, 2018
1 parent c5b3c3f commit 5672e8f60d18bde2c24865d3dd7cdfd335d487a8
@@ -26,13 +26,14 @@ let player = try AKAudioPlayer(file: tape)
//: Mix our reverberated oscillator with our player, so we can listen to both.
let mixer = AKMixer(player, reverb)
AudioKit.output = mixer
try AudioKit.start()
//: Now we set an AKNodeRecorder to our oscillator. You can change the recorded
//: node to "reverb" if you prefer to record a "wet" oscillator...
let recorder = try AKNodeRecorder(node: oscMixer, file: tape)
let recorder = try AKNodeRecorder(node: mixer)
AudioKit.output = mixer
try AudioKit.start()
//: Build our User interface
import AudioKitUI
@@ -65,7 +66,7 @@ class LiveView: AKLiveViewController, AKKeyboardDelegate {
})
addView(AKButton(title: "Save") { button in
tape.exportAsynchronously(name: "test",
recorder.audioFile?.exportAsynchronously(name: "test",
baseDir: .documents,
exportFormat: .caf) { [weak self] _, _ in
}

0 comments on commit 5672e8f

Please sign in to comment.