mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
audio player: don't exceed source limit; increase source limit
This commit is contained in:
parent
0b7b6261da
commit
c0e76181bd
@ -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()
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user