commit 06/10/2025

This commit is contained in:
2025-10-06 08:30:09 +07:00
parent 20dbc12b02
commit cf69c72f3c
9 changed files with 97 additions and 81 deletions

View File

@@ -23,6 +23,8 @@ lateinit var audioPlayer: AudioPlayer
val StreamerOutputs: MutableMap<String, BarixConnection> = HashMap()
lateinit var udpreceiver: UDPReceiver
const val version = "0.0.2 (23/09/2025)"
// AAS 64 channels
const val max_channel = 64
// dipakai untuk pilih voice type, bisa diganti via web nanti
var selected_voice = VoiceType.VOICE_1.name
@@ -91,7 +93,7 @@ fun main() {
val barixserver = TCP_Barix_Command_Server()
barixserver.StartTcpServer { cmd ->
Logger.info { cmd }
//Logger.info { cmd }
val _streamer = StreamerOutputs[cmd.ipaddress]
val _sc = db.soundchannelDB.List.find { it.ip == cmd.ipaddress }
if (_streamer == null) {
@@ -103,7 +105,8 @@ fun main() {
_bc.bufferRemain = cmd.buffremain
_bc.statusData = cmd.statusdata
StreamerOutputs[cmd.ipaddress] = _bc
}
Logger.info { "Created new Streamer Output for channel ${_sc.channel} with IP ${cmd.ipaddress}" }
} else Logger.warn { "soundChannelDB doesn't have soundchannel with IP ${cmd.ipaddress}" }
} else {
// sudah ada, update data