EyeTrackVR/EyeTrackApp/utils/misc_utils.py
PallasNeko adf3d86401 Added code to determine if the OS is Win or Linux.
Changed so that if Linux, PlaySound does nothing when executed.
2023-02-12 23:36:03 +09:00

15 lines
322 B
Python

import os
is_nt = True if os.name == "nt" else False
def PlaySound(*args, **kwargs): pass
SND_FILENAME = SND_ASYNC = 1
if is_nt:
import winsound
PlaySound = winsound.PlaySound
SND_FILENAME = winsound.SND_FILENAME
SND_ASYNC = winsound.SND_ASYNC
def clamp(x, low, high):
return max(low, min(x, high))