AudioBuffer class

AudioBuffer is a AudioFrames's internal audio buffer data. pBuffer contains pointer to a raw pcm audio.

Available extensions

Constructors

AudioBuffer.new({required AudioFrames root, required Pointer<Uint8> pBuffer, required int sizeInBytes, required int sizeInFrames, required AudioFormat format, required Memory memory})
Constructs the AudioBuffer from pointer.

Properties

format AudioFormat
format of pBuffer.
final
hashCode int
The hash code for this object.
no setterinherited
memory Memory
pBuffer's memory allocator.
final
pBuffer Pointer<Uint8>
Pointer to the raw audio data.
final
root AudioFrames
The root AudioFrames of this AudioBuffer.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeInBytes int
size of pBuffer in bytes.
final
sizeInFrames int
size of pBuffer in frames.
final

Methods

applyFloat32Volume(double volume, {int? frames}) → void

Available on AudioBuffer, provided by the AudioBufferExtension extension

Apply volume to the buffer while treating its sample format as SampleFormat.float32.
applyInt16Volume(double volume, {int? frames}) → void

Available on AudioBuffer, provided by the AudioBufferExtension extension

Apply volume to the buffer while treating its sample format as SampleFormat.int16.
applyInt32Volume(double volume, {int? frames}) → void

Available on AudioBuffer, provided by the AudioBufferExtension extension

Apply volume to the buffer while treating its sample format as SampleFormat.int32.
applyUint8Volume(double volume, {int? frames}) → void

Available on AudioBuffer, provided by the AudioBufferExtension extension

Apply volume to the buffer while treating its sample format as SampleFormat.uint8.
asFloat32ListView({int? frames}) Float32List

Available on AudioBuffer, provided by the AudioBufferExtension extension

Treats the buffer as a list of Float32 and returns it.
asInt16ListView({int? frames}) Int16List

Available on AudioBuffer, provided by the AudioBufferExtension extension

Treats the buffer as a list of Int16 and returns it.
asInt32ListView({int? frames}) Int32List

Available on AudioBuffer, provided by the AudioBufferExtension extension

Treats the buffer as a list of Int32 and returns it.
asUint8ListViewBytes({int? bytes}) Uint8List

Available on AudioBuffer, provided by the AudioBufferExtension extension

Treats the buffer as a list of Uint8 and returns it.
asUint8ListViewFrames({int? frames}) Uint8List

Available on AudioBuffer, provided by the AudioBufferExtension extension

Treats the buffer as a list of Uint8 and returns it.
clamp({int? frames}) → void

Available on AudioBuffer, provided by the AudioBufferExtension extension

Clamp buffer values to the valid range of the sample format.
copyFloat32List({int? frames, bool deinterleave = false}) Float32List

Available on AudioBuffer, provided by the AudioBufferExtension extension

Copy the buffer as a list of Float32 and returns it.
copyTo(AudioBuffer dst, {int? frames}) → void

Available on AudioBuffer, provided by the AudioBufferExtension extension

Copy the buffer into the dst buffer.
fillBytes(int data, {int? frames}) → void

Available on AudioBuffer, provided by the AudioBufferExtension extension

Fills the buffer with the specified data.
limit(int frames) AudioBuffer
limit the pBuffer to requested frames and returns a view of AudioBuffer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(int frames) AudioBuffer
move the pBuffer forward by requested frames and returns a view of AudioBuffer.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited