AudioDataContainer class
Class that contain the streamed audio data.
The data receives a Uint8List whatever the format is. This raw data
is stored into rawData and its format is the one used when initializing
the recorder.
This class also provide methods to convert the data to other formats based
on the original recorder format. For example to convert to Int8List the
data when the recorder is initialized with PCMFormat.f32le, you have to
use toS8List method. Be aware that the conversion is compute expensive and
should be avoided if possible initializing the recorder with the format
desired.
When streaming with StreamingFormat.opus, rawData contains a length-prefixed Opus packet instead of PCM samples.
Constructors
- AudioDataContainer(Uint8List u8Data)
- The class which is used by the Stream to listen to the audio data.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toF32List(
{required PCMFormat from}) → Float32List -
Convert the data to Float32List based on the
fromformat. -
toS16List(
{required PCMFormat from}) → Int16List -
Convert the data to Int16List based on the
fromformat. -
toS24List(
{required PCMFormat from}) → Int8List -
Convert the data to Int8List based on the
fromformat. -
toS24ListOnInt32(
{required PCMFormat from}) → Int32List -
Convert the data to Int32List based on the
fromformat. -
toS32List(
{required PCMFormat from}) → Int32List -
Convert the data to Int32List based on the
fromformat. -
toS8List(
{required PCMFormat from}) → Int8List -
Convert the data to Int8List based on the
fromformat. -
toString(
) → String -
A string representation of this object.
inherited
-
toU8List(
{required PCMFormat from}) → Uint8List -
Convert the data to Uint8List based on the
fromformat.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited