diff options
-rw-r--r-- | play_audio.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/play_audio.py b/play_audio.py index 2ed445b..bbcce0c 100644 --- a/play_audio.py +++ b/play_audio.py @@ -30,5 +30,15 @@ def play_audio_from_file(parent, file_path): command_line = ['gst-launch', 'filesrc', 'location=' + file_path, '! oggdemux', '! vorbisdec', '! audioconvert', '! alsasink'] - subprocess.call(command_line) + try: + subprocess.call(command_line) + except: + try: + command_line = ['gst-launch-10', 'filesrc', + 'location=' + file_path, + '! oggdemux', '! vorbisdec', '! audioconvert', + '! alsasink'] + subprocess.call(command_line) + except: + pass |