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:

Defined in:

remiaudio/drivers.cr

Class Method Summary

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.


[View source]