From 153d21ace9801ac665e2d7f99c967147d1214f29 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sun, 3 Sep 2023 14:39:50 +0200 Subject: Updated 16 files and added 5 files (automated) --- src/audio.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/audio.py') 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() -- cgit