Skip to content

Commit

Permalink
change terminating signal and wakeup signal sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongyihui committed Mar 27, 2018
1 parent f78d5bd commit a1c2c32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avs/mpg123_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ def play(self, uri):
self.event.set()

if self.process and self.process.poll() == None:
self.process.terminate()
if self.state == 'PAUSED':
os.kill(self.process.pid, signal.SIGCONT)
self.process.terminate()

self.state = 'PLAYING'

print('set play event')

def stop(self):
if self.process and self.process.poll() == None:
self.process.terminate()
if self.state == 'PAUSED':
os.kill(self.process.pid, signal.SIGCONT)
self.process.terminate()
self.state = 'NULL'

def pause(self):
Expand Down

0 comments on commit a1c2c32

Please sign in to comment.