commit 02/10/2025

This commit is contained in:
2025-10-02 13:17:52 +07:00
parent 83a6ee9fd0
commit 1e7adeba25
5 changed files with 278 additions and 19 deletions

View File

@@ -126,6 +126,14 @@ class AudioPlayer (var samplingrate: Int) {
return result
}
fun WavWriter(data: ByteArray, target: String, callback: BiConsumer<Boolean, String>) {
val source = AudioFileInfo()
source.bytes = data
source.fileName = "In-Memory Data"
val sources = listOf(source)
WavWriter(sources, target, callback)
}
/**
* Writes the audio data from the sources to a WAV file.
* @param sources List of AudioFileInfo objects containing the audio data to write.