Recording (Microphone)

Audio capture from the microphone input to the recording node

This example demonstrates how to capture audio directly from the microphone. The graph connects the main audio destination to the Recorder node, allowing an input signal to be recorded. Once recording begins, the engine saves the result to a stereo file.

// Configure the graph for rendering
let context = Assembler(rendering: .live).createAudioGraph()

// Configure a stereo recorder node and set the context to live mode
let recorder = Recorder(channels: .stereo)
context.addAutomaticPullNode(node: recorder)

// Configure node connections
try context.connect(source: context.destination, to: recorder)
recorder.record()

The following video shows the sample code in action and its real-time processing.

circle-info

For a complete description of each class, method, and property referenced in this section, refer to the official API documentationarrow-up-right, where you will find detailed references, available components, parameters, and additional usage code examples.

Last updated