diff options
Diffstat (limited to 'src/audio.py')
-rw-r--r-- | src/audio.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/audio.py b/src/audio.py index 1d8f725..169c886 100644 --- a/src/audio.py +++ b/src/audio.py @@ -1,10 +1,14 @@ import pygame import random -enable_audio = False +enable_audio = True + +try: + pygame.mixer.init() +except pygame.error: + print("WARNING: Failed to initialize DSP mixer.") + enable_audio = False -pygame.mixer.pre_init(48000, -16, 2, 2048) -pygame.mixer.init() pygame.mixer.set_num_channels(3) pygame.mixer.stop() |