AudioEngine
Entry point for the Klarinet audio library.
AudioEngine is the main factory for creating audio streams and querying available audio devices on the current platform.
Usage
val engine = AudioEngine.create()
val stream = engine.openStream(
config = AudioStreamConfig(sampleRate = 48000, channelCount = 2),
callback = myCallback,
)
stream.start()
// ... audio is playing ...
stream.stop()
stream.close()
engine.release()Platform Behavior
Android: Backed by Google Oboe (AAudio / OpenSL ES).
Apple: Backed by AVAudioEngine / Core Audio.
JS / Browser: Backed by the Web Audio API. Effects are native Web Audio nodes (not the C++ DSP core). File reads require decodeAudioFile or an AudioFileWriter first.
Always call release when the engine is no longer needed to free native resources.
Entry point for the Klarinet audio library.
AudioEngine is the main factory for creating audio streams and querying available audio devices on the current platform.
Usage
val engine = AudioEngine.create()
val stream = engine.openStream(
config = AudioStreamConfig(sampleRate = 48000, channelCount = 2),
callback = myCallback,
)
stream.start()
// ... audio is playing ...
stream.stop()
stream.close()
engine.release()Platform Behavior
Android: Backed by Google Oboe (AAudio / OpenSL ES).
Apple: Backed by AVAudioEngine / Core Audio.
JS / Browser: Backed by the Web Audio API. Effects are native Web Audio nodes (not the C++ DSP core). File reads require decodeAudioFile or an AudioFileWriter first.
Always call release when the engine is no longer needed to free native resources.
Entry point for the Klarinet audio library.
AudioEngine is the main factory for creating audio streams and querying available audio devices on the current platform.
Usage
val engine = AudioEngine.create()
val stream = engine.openStream(
config = AudioStreamConfig(sampleRate = 48000, channelCount = 2),
callback = myCallback,
)
stream.start()
// ... audio is playing ...
stream.stop()
stream.close()
engine.release()Platform Behavior
Android: Backed by Google Oboe (AAudio / OpenSL ES).
Apple: Backed by AVAudioEngine / Core Audio.
JS / Browser: Backed by the Web Audio API. Effects are native Web Audio nodes (not the C++ DSP core). File reads require decodeAudioFile or an AudioFileWriter first.
Always call release when the engine is no longer needed to free native resources.
Entry point for the Klarinet audio library.
AudioEngine is the main factory for creating audio streams and querying available audio devices on the current platform.
Usage
val engine = AudioEngine.create()
val stream = engine.openStream(
config = AudioStreamConfig(sampleRate = 48000, channelCount = 2),
callback = myCallback,
)
stream.start()
// ... audio is playing ...
stream.stop()
stream.close()
engine.release()Platform Behavior
Android: Backed by Google Oboe (AAudio / OpenSL ES).
Apple: Backed by AVAudioEngine / Core Audio.
JS / Browser: Backed by the Web Audio API. Effects are native Web Audio nodes (not the C++ DSP core). File reads require decodeAudioFile or an AudioFileWriter first.
Always call release when the engine is no longer needed to free native resources.
Entry point for the Klarinet audio library.
AudioEngine is the main factory for creating audio streams and querying available audio devices on the current platform.
Usage
val engine = AudioEngine.create()
val stream = engine.openStream(
config = AudioStreamConfig(sampleRate = 48000, channelCount = 2),
callback = myCallback,
)
stream.start()
// ... audio is playing ...
stream.stop()
stream.close()
engine.release()Platform Behavior
Android: Backed by Google Oboe (AAudio / OpenSL ES).
Apple: Backed by AVAudioEngine / Core Audio.
JS / Browser: Backed by the Web Audio API. Effects are native Web Audio nodes (not the C++ DSP core). File reads require decodeAudioFile or an AudioFileWriter first.
Always call release when the engine is no longer needed to free native resources.
Entry point for the Klarinet audio library.
AudioEngine is the main factory for creating audio streams and querying available audio devices on the current platform.
Usage
val engine = AudioEngine.create()
val stream = engine.openStream(
config = AudioStreamConfig(sampleRate = 48000, channelCount = 2),
callback = myCallback,
)
stream.start()
// ... audio is playing ...
stream.stop()
stream.close()
engine.release()Platform Behavior
Android: Backed by Google Oboe (AAudio / OpenSL ES).
Apple: Backed by AVAudioEngine / Core Audio.
JS / Browser: Backed by the Web Audio API. Effects are native Web Audio nodes (not the C++ DSP core). File reads require decodeAudioFile or an AudioFileWriter first.
Always call release when the engine is no longer needed to free native resources.
Types
Functions
Create a new audio effect of the given type.
Create a new audio effect of the given type.
Create a new audio effect of the given type.
Create a new audio effect of the given type.
Create a new audio effect of the given type.
Create a new audio effect of the given type.
Create a new empty effect chain for grouping and ordering effects.
Create a new empty effect chain for grouping and ordering effects.
Create a new empty effect chain for grouping and ordering effects.
Create a new empty effect chain for grouping and ordering effects.
Create a new empty effect chain for grouping and ordering effects.
Create a new empty effect chain for grouping and ordering effects.
List all available audio devices on the current platform.
List all available audio devices on the current platform.
List all available audio devices on the current platform.
List all available audio devices on the current platform.
List all available audio devices on the current platform.
List all available audio devices on the current platform.
Get the default audio device for the given direction.
Get the default audio device for the given direction.
Get the default audio device for the given direction.
Get the default audio device for the given direction.
Get the default audio device for the given direction.
Get the default audio device for the given direction.
Open a new audio stream with the given configuration.
Open a new audio stream with the given configuration.
Open a new audio stream with the given configuration.
Open a new audio stream with the given configuration.
Open a new audio stream with the given configuration.
Open a new audio stream with the given configuration.
Play an audio file through the engine.
Record audio from the microphone to a file.
Release all native resources held by this engine.
Release all native resources held by this engine.
Release all native resources held by this engine.
Release all native resources held by this engine.
Release all native resources held by this engine.
Release all native resources held by this engine.