pcmToWav

fun pcmToWav(pcm16Samples: ShortArray, channelCount: Int, sampleRate: Int, bitsPerSample: Int, misnapMibiData: MiSnapMibiData? = null): ByteArray

Converts a PCM16 formatted data into WAV formatted data.

Return

The encoded WAV formatted data.

Parameters

pcm16Samples

The PCM16 encoded data.

channelCount

The number of audio channels encoded in the PCM16 data.

sampleRate

The sample rate of the PCM16 data.

bitsPerSample

The number of bits per sample for the PCM16 data.

misnapMibiData

The mibi data to encode into the WAV formatted data.

Throws

when there is an issue creating the WAV formatted data.


fun pcmToWav(pcmData: ByteArray, channelCount: Int, sampleRate: Int, bitsPerSample: Int, misnapMibiData: MiSnapMibiData? = null): ByteArray

Converts a PCM16 formatted data into WAV formatted data.

Return

The encoded WAV formatted data.

Parameters

pcmData

The PCM16 encoded data.

channelCount

The number of audio channels encoded in the PCM16 data.

sampleRate

The sample rate of the PCM16 data.

bitsPerSample

The number of bits per sample for the PCM16 data.

misnapMibiData

The mibi data to encode into the WAV formatted data.

Throws

when there is an issue creating the WAV formatted data.