More playing with the mixer for stability and fewer or no clicks.

This commit is contained in:
Storm Dragon
2025-09-17 17:44:04 -04:00
parent 0bbf35a4c5
commit 8c57afe65b
2 changed files with 4 additions and 3 deletions

View File

@@ -46,9 +46,9 @@ def initialize_gui(gameTitle):
# Initialize audio system if not already done
if not pygame.mixer.get_init():
pygame.mixer.pre_init(44100, -16, 2, 1536)
pygame.mixer.pre_init(44100, -16, 2, 4096)
pygame.mixer.init()
pygame.mixer.set_num_channels(64)
pygame.mixer.set_num_channels(48)
pygame.mixer.set_reserved(0) # Reserve channel for cut scenes
# Enable key repeat for volume controls