From 0f25345a6a10bdd925263ed008c514f8c2b509bb Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Tue, 2 Nov 2021 23:26:26 +0000 Subject: [PATCH] Fix pulseaudio error on !linux --- helpers/device_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/device_manager.py b/helpers/device_manager.py index aa5a7b0..df68409 100644 --- a/helpers/device_manager.py +++ b/helpers/device_manager.py @@ -4,7 +4,8 @@ from helpers.os_environment import isLinux, isMacOS, isWindows import os os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "hide" -os.putenv('SDL_AUDIODRIVER', 'pulseaudio') +if isLinux(): + os.putenv('SDL_AUDIODRIVER', 'pulseaudio') import pygame._sdl2 as sdl2 from pygame import mixer import glob