appendFileContents method

void appendFileContents(
  1. List<int> fileContents, {
  2. bool findDataChunk = true,
})

Append fileContents read as bytes to our wave file. If findDataChunk is true, searches first to find the file's data chunk. It's recommended to call getDataChunk on the file contents you want to append first, to prevent repeating everytime you add the same file.

Implementation

void appendFileContents(List<int> fileContents, {bool findDataChunk = true}) {
  var dataChunk = findDataChunk ? getDataChunk(fileContents) : fileContents;
  _lastSampleSize = dataChunk.length;
  _outputBytes.addAll(dataChunk);
}