Wait for all writes, flush the encoder, and close the file to ensure complete file contents.
Close the previous output and asynchronously create a file, with sample rate in Hz; return whether it succeeded.
filenamesampleRatechannelCountchannelMapAsynchronously encode samples in order; do not modify data until the Promise settles.
data
Asynchronously encode interleaved 16-bit PCM into an audio file whose format is determined by the file extension.