audio engine: resize buffer without restarting the game

This commit is contained in:
minjaesong
2024-01-16 03:31:22 +09:00
parent 755ced9ea4
commit 2bd1b61a35
20 changed files with 39 additions and 121 deletions

View File

@@ -67,6 +67,9 @@ class FixtureJukebox : Electric {
it.setSpriteImage(TextureRegionPack(backLampTex, TILE_SIZE * 2, TILE_SIZE * 3))
it.setRowsAndFrames(1, 1)
}
App.audioMixerRenewHooks[this] = { stopGracefully() }
}
override val canBeDespawned: Boolean
@@ -174,6 +177,7 @@ class FixtureJukebox : Electric {
}
override fun dispose() {
App.audioMixerRenewHooks.remove(this)
super.dispose()
// testMusic.gdxMusic.dispose()
}