Sounds #327

Merged
Atheros1 merged 6 commits from master into master 2013-07-23 21:37:45 +02:00
Showing only changes of commit 3e13468695 - Show all commits

View File

@ -29,6 +29,7 @@ import os
from pyelliptic.openssl import OpenSSL from pyelliptic.openssl import OpenSSL
import pickle import pickle
import platform import platform
import subprocess
try: try:
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
@ -936,9 +937,9 @@ class MyForm(QtGui.QMainWindow):
if 'linux' in sys.platform: if 'linux' in sys.platform:
# Note: QSound was a nice idea but it didn't work # Note: QSound was a nice idea but it didn't work
if '.mp3' in soundFilename: if '.mp3' in soundFilename:
os.popen('gst123 ' + soundFilename) subprocess.call(["gst123", soundFilename])
else: else:
os.popen('aplay ' + soundFilename) subprocess.call(["aplay", soundFilename])
elif sys.platform[0:3] == 'win': elif sys.platform[0:3] == 'win':
# use winsound on Windows # use winsound on Windows
import winsound import winsound