write

fun write(audioDataSource: AudioSource)

Writes the audio data from an AudioBuffer to a file in the specified format.

Parameters

audioDataSource

The buffer containing the raw audio samples and format info.

Throws

if an unsupported format is provided or an I/O error occurs. In a more robust application, this would return a Result.