mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Solve ANRs - play overlay music on another thread
This commit is contained in:
parent
9f4828d55a
commit
096f62a719
@ -630,8 +630,10 @@ class MusicController {
|
|||||||
isLooping: Boolean = false,
|
isLooping: Boolean = false,
|
||||||
fadeIn: Boolean = false
|
fadeIn: Boolean = false
|
||||||
) {
|
) {
|
||||||
val file = getMatchingFiles(folder, name).firstOrNull() ?: return
|
Concurrency.run { // no reason for this to run on GL thread
|
||||||
playOverlay(file, volume, isLooping, fadeIn)
|
val file = getMatchingFiles(folder, name).firstOrNull() ?: return@run
|
||||||
|
playOverlay(file, volume, isLooping, fadeIn)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called for Leader Voices */
|
/** Called for Leader Voices */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user