minor bug fixes

This commit is contained in:
Yonokid
2025-08-15 00:55:46 -04:00
parent 64ce14bd3c
commit 1d235e1571
3 changed files with 18 additions and 11 deletions

View File

@@ -812,7 +812,10 @@ class AudioEngine:
del self.sounds[sound]
def unload_all_sounds(self) -> None:
self.sounds.clear()
sounds_to_clear = list(self.sounds.keys())
for key in sounds_to_clear:
if key in self.sounds:
del self.sounds[key]
def normalize_sound(self, sound: str, rms: float) -> None:
if sound in self.sounds: