struct RemiAudio::Formats::SampleInfo
- RemiAudio::Formats::SampleInfo
- Struct
- Value
- Object
Overview
The SampleInfo
structure is used to get various information about the
samples in an AudioFile
.
Defined in:
remiaudio/formats/sampleinfo.crConstructors
-
.from(filename : String | Path) : SampleInfo
Attempts to determine the format of filename, then creates a new
SampleInfo
instance containing the information for that file. -
.fromAu(filename : String | Path) : SampleInfo
Creates a new
SampleInfo
instance containing the information for the given Au file. -
.fromWav(filename : String | Path) : SampleInfo
Creates a new
SampleInfo
instance containing the information for the given RIFF WAVE file. -
.new(aud : AudioFile)
Creates a new
SampleInfo
by reading the currently available samples in aud
Instance Method Summary
-
#bitDepth : UInt32
The bit depth of the source audio.
-
#max : Float64
The maximum sample value, as a
::Float64
sample values. -
#maxPerChan : Array(Float64)
The maximum sample value, as a
::Float64
sample values, for each channel. -
#min : Float64
The minimum sample value, as a
::Float64
sample values. -
#minPerChan : Array(Float64)
The minimum sample value, as a
::Float64
sample values, for each channel. -
#numSamples : UInt64
The total number of samples across all channels.
-
#peak : Float64
The peak amplitude of this file, in decibels.
-
#peakPerChan : Array(Float64)
The peak amplitude of this file per channel, in decibels.
-
#rms : Float64
The average (RMS) amplitude of this file, in decibels.
-
#rmsPerChan : Array(Float64)
The average (RMS) amplitude of this file for each channel, in decibels.
-
#sampleRate : UInt32
The sample rate of the source audio.
-
#samplesPerChan : UInt64
The total number of samples per channels.
Constructor Detail
Attempts to determine the format of filename, then creates a new
SampleInfo
instance containing the information for that file.
If this cannot determine the format, it will raise a FormatError
.
Creates a new SampleInfo
instance containing the information for the
given Au file.
Creates a new SampleInfo
instance containing the information for the
given RIFF WAVE file.
Creates a new SampleInfo
by reading the currently available samples in
aud
Instance Method Detail
The maximum sample value, as a ::Float64
sample values. This is the
maximum among all channels.
The maximum sample value, as a ::Float64
sample values, for each
channel.
The minimum sample value, as a ::Float64
sample values, for each
channel.
The peak amplitude of this file, in decibels. This is the peak among all channels.
The peak amplitude of this file per channel, in decibels.
The average (RMS) amplitude of this file, in decibels. This is the average between all channels.
The average (RMS) amplitude of this file for each channel, in decibels.