A different approach to improving sound.

This commit is contained in:
Storm Dragon
2025-09-18 20:36:26 -04:00
parent 385e5a81ed
commit 2be0424168
3 changed files with 18 additions and 21 deletions

View File

@@ -46,10 +46,10 @@ def initialize_gui(gameTitle):
# Initialize audio system if not already done
if not pygame.mixer.get_init():
pygame.mixer.pre_init(44100, -16, 2, 4096)
pygame.mixer.pre_init(44100, -16, 2, 4096, allowedchanges=0)
pygame.mixer.init()
pygame.mixer.set_num_channels(32)
pygame.mixer.set_reserved(0) # Reserve channel for cut scenes
pygame.mixer.set_reserved(1) # Reserve channel 0 for cutscenes
# Enable key repeat for volume controls
pygame.key.set_repeat(500, 100)