From 89eca9eebcec92efaf7bf5ecada3af4fbf540c9f Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Mon, 4 Jun 2007 22:29:55 +0000 Subject: Don't kill the player process (and effectively the decode process) when completely stopped. Instead, send them SIGSTOP to pause the process until they're needed again. Then send them SIGCONT instead of re-spawning them. git-svn-id: https://svn.musicpd.org/mpd/trunk@6485 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/playlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/playlist.c') diff --git a/src/playlist.c b/src/playlist.c index f6ae8ab51..8b2bc1f42 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -788,7 +788,7 @@ int deleteFromPlaylist(int fd, int song) && playlist.current == songOrder) { /*if(playlist.current>=playlist.length) return playerStop(fd); else return playPlaylistOrderNumber(fd,playlist.current); */ - playerQuit(STDERR_FILENO); + playerWait(STDERR_FILENO); playlist_noGoToNext = 1; } @@ -829,7 +829,7 @@ void deleteASongFromPlaylist(Song * song) int stopPlaylist(int fd) { DEBUG("playlist: stop\n"); - if (playerQuit(fd) < 0) + if (playerWait(fd) < 0) return -1; playlist.queued = -1; playlist_state = PLAYLIST_STATE_STOP; -- cgit v1.2.3