Minor tweaks
This commit is contained in:
@ -7,16 +7,15 @@ Created on Fri Jan 8 10:26:56 2021
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from sys import platform as _platform
|
from sys import platform
|
||||||
|
|
||||||
sound_args = ""
|
sound_args = ""
|
||||||
|
|
||||||
def play_sound(file):
|
def play_sound(file):
|
||||||
if _platform == "win32" or _platform == "win64" or _platform == "cygwin":
|
if platform == "win32" or platform == "win64" or platform == "cygwin":
|
||||||
cmd = "wmplayer " + '"' + file + '"'
|
cmd = "wmplayer " + '"' + file + '"'
|
||||||
else:
|
else:
|
||||||
cmd = "aplay -N " + sound_args + " " + file + " &"
|
cmd = "aplay -N " + sound_args + " " + file + " &"
|
||||||
# print(cmd)
|
# print(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
#play_sound("../misc/boat-horn.wav")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user