Audio Engine
In order to run an audio graph you need to create an AudioEngine
instance. The audio engine handles the device-level audio I/O and connects the device's microphone to the graph's input node and the device's speaker to the graph's output node.
Due to the platform differences the audio engine implementation contains platform-specific code and might provide slightly different features. For example, the audio engine makes use of the device's echo cancellation system.
You can start and stop the audio engine by simply call the start
and stop
methods. One audiograph must only be run by one audio engine.
- Swift
- Kotlin
let audioEngine = SBAudioEngine() // Creating the audio engine
...
audioEngine.start(audioGraph) // Starting the audio engine
...
audioEngine.stop() // Stopping the audio engine
val audioEngine = AudioEngine(context) // Creating the audio engine
...
audioEngine.start(audioGraph) // Starting the audio engine
...
audioEngine.stop() // Stopping the audio engine
Read the iOS and Android subpages for further information on the respective AudioEngine
platform implementations.
📄️ iOS
Using the Switchboard SDK AudioEngine on iOS.
📄️ Android
Using the Switchboard SDK AudioEngine on Android.