enum RemiAudio::Formats::AuEncoding

Overview

The supported encodings for an Au file.

Defined in:

remiaudio/formats/au.cr

Enum Members

MuLaw = 1

µLaw encoded samples.

Lpcm8bit = 2

8-bit signed linear PCM samples

Lpcm16bit = 3

16-bit signed linear PCM samples

Lpcm24bit = 4

24-bit signed linear PCM samples

Lpcm32bit = 5

32-bit signed linear PCM samples

Float32 = 6

32-bit IEEE Float samples

Float64 = 7

64-bit IEEE Float samples

ALaw = 27

ALaw encoded samples.

Constructors

Instance Method Summary

Constructor Detail

def self.from_value(value : Int) : self #

[View source]

Instance Method Detail

def a_law? #

[View source]
def checkArray(array : SampleData) : Bool #

Checks that array is the correct type for this encoding. If it is, this returns true, otherwise it returns false.


[View source]
def float32? #

[View source]
def float64? #

[View source]
def getBitDepth : UInt8 #

Returns the bit depth for a single sample using this encoding.


[View source]
def getByteSize : Int32 #

Returns the size in bytes for a single sample using this encoding.


[View source]
def getFloat64Div : Float64 #

Returns the value to use when converting a value in this encoding to a ::Float64. This will raise an UnsupportedEncodingError if converting from this encoding is not supported.


[View source]
def getFloat64Div? : Float64 | Nil #

Returns the value to use when converting a value in this encoding to a ::Float64, or nil if converting from this encoding is not supported.


[View source]
def lpcm16bit? #

[View source]
def lpcm24bit? #

[View source]
def lpcm32bit? #

[View source]
def lpcm8bit? #

[View source]
def makeArray(size : Int32) : SampleData #

Creates a new array of the given size that is appropriate for this encoding.


[View source]
def mu_law? #

[View source]
def toSampleFormat : SampleFormat #

Gets the SampleFormat that describes this encoding. If this is an encoding that does not describe a PCM/Float encoding, or an encoding not directly supported by RemiAudio, this raises an UnsupportedEncodingError.


[View source]
def toSampleFormat? : SampleFormat | Nil #

Attempts to get the SampleFormat that describes this encoding, or nil if it's a non PCM/Float encoding, or an encoding not directly supported by RemiAudio.


[View source]