Waveform class
Audio waveform data in the audiowaveform format, suitable for visual rendering.
Constructors
Properties
-
data
→ List<
int> -
A list of min/max pairs, each representing a pixel. For each pixel, the
min/max pair represents the minimum and maximum sample over the
samplesPerPixel range.
final
- duration → Duration
-
The duration of audio, inferred from the length of the waveform data.
no setter
- flags → int
-
A bit field where bit 0 indicates the resolution of each pixel value. 0
indicates 16-bit resolution, while 1 indicates 8-bit resolution.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
The number of pixels in the data.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate → int
-
The sample rate in Hertz of the original audio.
final
- samplesPerPixel → int
-
The number of samples captured for each pixel.
final
- version → int
-
The format version.
final
Methods
-
getPixelMax(
int i) → int -
Returns the maximum sample for pixel
i
. -
getPixelMin(
int i) → int -
Returns the minimum sample for pixel
i
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
positionToPixel(
Duration position) → double -
Converts an audio position to a pixel position. The returned position is a
double for accuracy, but can be converted
toInt
and used to access the nearest pixel value via getPixelMin/getPixelMax. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int i) → int -
Returns the data at index
i
, or zero when out of bounds.