Skip to main content Link Menu Expand (external link) Document Search Copy Copied
waveToPCMBuffer method - FlutterSoundHelper class - helper library - Dart API
menu
waveToPCMBuffer

waveToPCMBuffer method

Uint8List waveToPCMBuffer({
  1. required Uint8List inputBuffer,
})

Convert a WAVE buffer to a Raw PCM buffer.


Remove WAVE header in front of the Wave buffer.

Note that this verb is not asynchronous and does not return a Future. See here a discussion about Raw PCM and WAVE file format.

Example

Uint8List myPCMBuffer = waveToPCMBuffer(inputBuffer: myWavBuffer);

Implementation

Uint8List waveToPCMBuffer({required Uint8List inputBuffer}) {
  return inputBuffer.sublist(WaveHeader.headerLength);
}
flutter_sound 9.25.3