commit 07/10/2025

This commit is contained in:
2025-10-07 09:28:48 +07:00
parent a8e5b027ef
commit 748301a5cb
5 changed files with 114 additions and 103 deletions

View File

@@ -1,5 +1,5 @@
import audio.AudioFileInfo
import audio.AudioPlayer
import audio.ContentCache
import audio.UDPReceiver
import barix.BarixConnection
import barix.TCP_Barix_Command_Server
@@ -43,11 +43,8 @@ val urutan_bahasa = listOf(
Language.ARABIC.name
)
/**
* Common audio files, seperti chimeup, chimedown, silence1s, silencehalf
*/
val commonAudio : MutableMap<String, AudioFileInfo> = HashMap()
val contentCache = ContentCache()
/**
* Create necessary folders if not exist
*/
@@ -75,7 +72,7 @@ fun files_preparation(){
if (afi.isValid()){
Logger.info { "Common audio $it loaded from ${pp.toAbsolutePath()}" }
val key = it.substring(0, it.length - 4) // buang .wav
commonAudio[key] = afi
contentCache.addAudioFile(key, afi)
} else {
Logger.error { "Failed to load common audio $it from ${pp.toAbsolutePath()}" }
}