module RemiAudio::Drivers
Overview
The RemiAudio::Drivers
module provides an abstract way to access various
audio backends. Note that the set of backends depends on two things: the
target platform (Linux, BSD, etc.), and the compile time flags.
The following backends are available on Linux:
- PulseAudio (disable with
-Dremiaudio_no_pulseaudio
) - PortAudio (disable with
-Dremiaudio_no_portaudio
) - libao (disable with
-Dremiaudio_no_libao
)
Defined in:
remiaudio/drivers.crClass Method Summary
-
.withDevice(typ : T.class, sampleRate : Int, bitDepth : Int, channels : Int, &) : Nil forall T
Creates a new
AudioDevice
instance, then yields it to the block.
Class Method Detail
def self.withDevice(typ : T.class, sampleRate : Int, bitDepth : Int, channels : Int, &) : Nil forall T
#
Creates a new AudioDevice
instance, then yields it to the block. This
ensures that AudioDevice#stop
is called once the block exits.
T must be a subclass of RemiAudio::Drivers::AudioDevice
except
**RemiAudio::Drivers::TcpDevice
.