Recording (Bounce)
How to bounce from an source into a stereo file in offline mode
// Configure the graph for rendering
let context = Assembler(rendering: .offline).createAudioGraph()
// Configure an audio source (Renderer) from a local audio file
let url = URL(fileURLWithPath: "/path/to/source.mp3")
let source = FileRenderer(contentsOf: url)
// Configure the intermediate stereo recording node
let destination = Recorder(channels: .stereo)
context.addAutomaticPullNode(node: destination)
// Configure node connections
try context.connect(source: source, to: destination)
source.play(after: 0)
// Start recording
destination.record()
context.startOfflineRendering()Last updated