aboutsummaryrefslogtreecommitdiff
path: root/player.go
diff options
context:
space:
mode:
Diffstat (limited to 'player.go')
-rw-r--r--player.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/player.go b/player.go
index 9b523fe..d5fe270 100644
--- a/player.go
+++ b/player.go
@@ -46,7 +46,10 @@ func NewPlayer(wrms *Wrms, backends []string) Player {
func (player *Player) Play(song *Song) {
if player.mpv != nil {
llog.Debug("Send SIGCONT to mpv subprocess")
- player.mpv.Process.Signal(syscall.SIGCONT)
+ err := player.mpv.Process.Signal(syscall.SIGCONT)
+ if err != nil {
+ llog.Fatal("Failed to send SIGCONT to mpv")
+ }
return
}
@@ -98,7 +101,10 @@ func (player *Player) PlayData(data io.Reader) {
func (player *Player) Pause() {
if player.mpv != nil {
llog.Debug("Send SIGSTOP to mpv subprocess")
- player.mpv.Process.Signal(syscall.SIGSTOP)
+ err := player.mpv.Process.Signal(syscall.SIGSTOP)
+ if err != nil {
+ llog.Fatal("Failed to send SIGSTOP to mpv")
+ }
}
}