Skip to content

Commit ae0a9f9

Browse files
authored
Merge pull request #142 from ysak-y/modify_audio_player_command_for_darwin
Modify audio playing command in play_audio() for Darwin
2 parents fd3cf9d + c02315b commit ae0a9f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

precise/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ def play_audio(filename: str):
8080
import platform
8181
from subprocess import Popen
8282

83-
player = 'play' if platform.system() == 'Darwin' else 'aplay'
84-
Popen([player, '-q', filename])
83+
if platform.system() == 'Darwin':
84+
Popen(['afplay', filename])
85+
else:
86+
Popen(['aplay', '-q', filename])
8587

8688

8789
def activate_notify():

0 commit comments

Comments
 (0)