class RemiSound::AoDevice

Overview

The AoDevice class is used to playback audio using libao.

As libao does not support output to Float32 directly, this class will convert the audio to the requested bit rate on-the-fly. It does this without any dithering.

Defined in:

remisound/drivers/ao.cr

Constructors

Instance Method Summary

Instance methods inherited from class RemiSound::AudioDevice

bitDepth : UInt8 bitDepth, bufferSize : UInt32 bufferSize, bufferSize=(value : UInt32) : Nil bufferSize=, channels : UInt8 channels, expectedBufferSize : UInt32 expectedBufferSize, sampleRate : UInt32 sampleRate, start : Nil start, started? : Bool started?, stop : Nil stop, writeBuffer(buf : Array(Float32) | Slice(Float32)) : Nil writeBuffer

Constructor methods inherited from class RemiSound::AudioDevice

new(newSampleRate : Int, newBitDepth : Int, newChannels : Int) new

Constructor Detail

def self.new(newSampleRate : Int, newBitDepth : Int, newChannels : Int) #

[View source]

Instance Method Detail

def author : String #

def availableOptions : Array(String) #

def comment : String #

def driverID : Int32 #

def driverID=(id : Int32) : Nil #

[View source]
def matrix : String #

def matrix=(value : String) : Nil #

[View source]
def name : String #

def preferredByteFormat : Format #

def priority : Int32 #

def shortName : String #

def start : Nil #
Description copied from class RemiSound::AudioDevice

Opens the audio stream. This must be called before #writeBuffer is called.


[View source]
def stop : Nil #
Description copied from class RemiSound::AudioDevice

Closes the audio stream and frees resources. This must be called when you are finished using the instance.


[View source]
def type : DriverType #

def writeBuffer(buf : Array(Float32) | Slice(Float32)) : Nil #

[View source]