mining sounds wont overlap

This commit is contained in:
minjaesong
2024-07-13 02:18:09 +09:00
parent 92f28887ec
commit 4f6b66b049
5 changed files with 56 additions and 33 deletions

View File

@@ -32,7 +32,7 @@ class AudioCodex {
fun getRandomAudio(identifier: String): MusicContainer? {
val file = audio[identifier]?.random()
return if (file != null) {
MusicContainer(file.nameWithoutExtension(), file.file()) {
MusicContainer(identifier.substringBeforeLast('.') + "." + file.nameWithoutExtension(), file.file()) {
it.tryDispose()
}
}