commit 20/10/2025
This commit is contained in:
13
src/Main.kt
13
src/Main.kt
@@ -5,6 +5,8 @@ import audio.UDPReceiver
|
||||
import barix.BarixConnection
|
||||
import barix.TCP_Barix_Command_Server
|
||||
import codes.Somecodes
|
||||
import codes.configFile
|
||||
import codes.configKeys
|
||||
import com.sun.jna.Platform
|
||||
import commandServer.TCP_Android_Command_Server
|
||||
import content.Category
|
||||
@@ -31,7 +33,7 @@ lateinit var audioPlayer: AudioPlayer
|
||||
val StreamerOutputs: MutableMap<String, BarixConnection> = HashMap()
|
||||
lateinit var udpreceiver: UDPReceiver
|
||||
lateinit var tcpreceiver: TCPReceiver
|
||||
const val version = "0.0.9 (20/10/2025)"
|
||||
const val version = "0.0.10 (20/10/2025)"
|
||||
// AAS 64 channels
|
||||
const val max_channel = 64
|
||||
|
||||
@@ -55,7 +57,8 @@ val contentCache = ContentCache()
|
||||
*/
|
||||
fun folder_preparation(){
|
||||
// sementara diset begini, nanti pake config file
|
||||
Somecodes.Soundbank_directory = Paths.get("c:\\soundbank")
|
||||
//Somecodes.Soundbank_directory = Paths.get("c:\\soundbank")
|
||||
Somecodes.Soundbank_directory = Paths.get(config.Get(configKeys.SOUNDBANK_DIRECTORY.key))
|
||||
Files.createDirectories(Somecodes.SoundbankResult_directory)
|
||||
Files.createDirectories(Somecodes.PagingResult_directory)
|
||||
Files.createDirectories(Somecodes.Soundbank_directory)
|
||||
@@ -94,6 +97,8 @@ fun files_preparation(){
|
||||
|
||||
}
|
||||
|
||||
lateinit var config : configFile;
|
||||
|
||||
// Application start here
|
||||
fun main() {
|
||||
if (Platform.isWindows()) {
|
||||
@@ -102,6 +107,7 @@ fun main() {
|
||||
}
|
||||
Logger.info { "Starting AAS New Generation version $version" }
|
||||
|
||||
config = configFile()
|
||||
folder_preparation()
|
||||
|
||||
audioPlayer = AudioPlayer(44100) // 44100 Hz sampling rate
|
||||
@@ -109,8 +115,10 @@ fun main() {
|
||||
|
||||
files_preparation()
|
||||
|
||||
|
||||
db = MariaDB()
|
||||
|
||||
|
||||
val subcode01 = MainExtension01()
|
||||
|
||||
// Coroutine untuk cek Paging Queue dan AAS Queue setiap detik
|
||||
@@ -171,6 +179,7 @@ fun main() {
|
||||
val _streamer = StreamerOutputs[cmd.ipaddress]
|
||||
val _sc = db.soundchannelDB.List.find { it.ip == cmd.ipaddress }
|
||||
if (_streamer == null) {
|
||||
|
||||
// belum create BarixConnection untuk ipaddress ini
|
||||
//Logger.info { "New Streamer Output connection from ${cmd.ipaddress}" }
|
||||
if (_sc != null) {
|
||||
|
||||
Reference in New Issue
Block a user