MyAudioTrack16Bit class

Singleton class for managing 16-bit PCM audio playback using FlutterPcmSound.

MyAudioTrack16Bit handles the setup, feeding, and release of audio resources for real-time PCM audio playback. It initializes the audio engine with a sample rate of 4000 Hz and a single channel, and provides methods to play PCM data and release resources. The class maintains internal buffers and state for audio data management.

Example usage:

final audioTrack = MyAudioTrack16Bit();
await audioTrack.playPCM(pcmData);
await audioTrack.releaseAudioTrack();

Constructors

MyAudioTrack16Bit()
factory

Properties

bufForRealBudian List<int>
getter/setter pair
bufSaveForRealTime List<int>
getter/setter pair
byteAvaliableToRead int
getter/setter pair
dataNessary bool
getter/setter pair
firstStart bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
initialized bool
getter/setter pair
lastData int
getter/setter pair
packageCountCallback int
getter/setter pair
packageReadCount int
getter/setter pair
packageReadIndex int
getter/setter pair
packageWriteCount int
getter/setter pair
packageWriteIndex int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
playPCM(List<int> pcmData) Future<void>
releaseAudioTrack() Future<void>
toString() String
A string representation of this object.
inherited

Operators

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

Constants

MAX_BUF_PER200_SZIE → const int
MAX_BUF_PER320_SZIE → const int
USHORT_MASK → const int