diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/sound/AudioPlayer.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/sound/AudioPlayer.kt index b16cbda54..c17a5b771 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/sound/AudioPlayer.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/sound/AudioPlayer.kt @@ -173,7 +173,7 @@ class AudioPlayer( } } // no source available - if (sources.size > SoundConstants.MAX_SOURCES_AMOUNT) { + if (sources.size >= SoundConstants.MAX_SOURCES_AMOUNT) { return null } val source = SoundSource() diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/sound/SoundConstants.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/sound/SoundConstants.kt index 76091a4af..b39cec170 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/sound/SoundConstants.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/sound/SoundConstants.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2021 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -17,5 +17,5 @@ object SoundConstants { const val PRELOAD_ALL_SOUNDS = false const val DISABLE_PRELOADING = false - const val MAX_SOURCES_AMOUNT = 32 + const val MAX_SOURCES_AMOUNT = 127 }