enum RemiAudio::Formats::WavEncoding
Overview
The supported encodings for a RIFF WAVE file.
Defined in:
remiaudio/formats/wav.crEnum Members
-
Lpcm =
1
-
Linear PCM samples.
-
Float =
3
-
IEEE floating point samples.
-
ALaw =
6
-
ALaw encoded samples.
-
MuLaw =
7
-
µLaw encoded samples.
Constructors
Instance Method Summary
- #a_law?
-
#checkArray(array : SampleData, bitDepth : Int) : Bool
Checks that array is the correct type for this encoding.
- #float?
-
#getByteSize(bitDepth : Int) : Int32
Returns the size in bytes for a single sample using this encoding.
-
#getFloat64Div(bitDepth : Int) : Float64
Returns the value to use when converting a value in this encoding to a
::Float64
. -
#getFloat64Div?(bitDepth : Int) : Float64 | Nil
Returns the value to use when converting a value in this encoding to a
::Float64
, ornil
if converting from this encoding is not supported. - #lpcm?
-
#makeArray(size : Int32, bitDepth : Int) : SampleData
Creates a new array of the given size that is appropriate for this encoding.
- #mu_law?
-
#toSampleFormat(bitDepth : Int) : SampleFormat
Gets the
SampleFormat
that describes this encoding. -
#toSampleFormat?(bitDepth : Int) : SampleFormat | Nil
Attempts to get the
SampleFormat
that describes this encoding, ornil
if it's a non PCM/Float encoding, or an encoding not directly supported by RemiAudio.
Constructor Detail
Instance Method Detail
Checks that array is the correct type for this encoding. If it is, this
returns true
, otherwise it returns false
.
Returns the size in bytes for a single sample using this encoding.
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.
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.
Creates a new array of the given size that is appropriate for this encoding.
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 a RemiAudioError
.
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.