Files
Pynomicon/classes/utils/audio.py
2021-02-02 13:44:11 -05:00

22 lines
391 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 8 10:26:56 2021
@author: neal
"""
import os
from sys import platform
sound_args = ""
def play_sound(file):
if platform == "win32" or platform == "win64" or platform == "cygwin":
cmd = "wmplayer " + '"' + file + '"'
else:
cmd = "aplay -N " + sound_args + " " + file + " &"
# print(cmd)
os.system(cmd)