mirror of
https://github.com/lutris/lutris
synced 2024-11-05 18:10:49 +00:00
Don't use shell=true when restarting pulseaudio
This commit is contained in:
parent
9ce1cd8394
commit
2f6a4f7a78
1 changed files with 5 additions and 2 deletions
|
@ -1,9 +1,12 @@
|
|||
"""Whatever it is we want to do with audio module"""
|
||||
import subprocess
|
||||
import time
|
||||
from lutris.util.log import logger
|
||||
|
||||
|
||||
def reset_pulse():
|
||||
"""Reset pulseaudio."""
|
||||
pulse_reset = "pulseaudio --kill && sleep 1 && pulseaudio --start"
|
||||
subprocess.Popen(pulse_reset, shell=True)
|
||||
subprocess.Popen(["pulseaudio", "--kill"])
|
||||
time.sleep(1000)
|
||||
subprocess.Popen(["pulseaudio", "--start"])
|
||||
logger.debug("PulseAudio restarted")
|
||||
|
|
Loading…
Reference in a new issue