arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Flutter Sound Helpers API

pcmToWaveBuffer()

hashtag
pcmToWaveBuffer()

  • Dart API: pcmToWaveBuffer()arrow-up-right

This verb is usefull to convert a Raw PCM buffer to a Wave buffer.

It adds a Wave envelop in front of the PCM buffer, so that the file can be played back with startPlayerFromBuffer().

Note: the parameters numChannels and sampleRate are mandatory, and must match the actual PCM data. a discussion about Raw PCM and WAVE file format.

Example:

</div>


        Uint8List myWavBuffer = await flutterSoundHelper.pcmToWaveBuffer(inputBuffer: myPCMBuffer, numChannels: 1, sampleRate: 8000);
See herearrow-up-right
Dart
Javascript

        Lorem ipsum ...