Reverb (Convolution)
Convolution-based reverberation configuration to simulate acoustics
// Configure the graph for rendering
let context = Assembler(rendering: .live).createAudioGraph()
// Configure an audio source (Renderer) from a local audio file
let url = URL(fileURLWithPath: "/path/to/audio.mp3")
let source = MediaRenderer(contentsOf: url)
// Configure the impulse response (IR) from a local file
let impulse = URL(fileURLWithPath: "/path/to/reverb_ir.wav")
let reverb = Reverb(contentsOf: impulse, channels: .stereo)
let destination = Graph(from: reverb)
// Configure node connections
try context.connect(source: source, to: destination)
try context.connect(source: destination, to: context.destination)
source.play(after: 0)Last updated