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
This commit is contained in:
J. Alexander Treuman
2007-06-04 22:29:55 +00:00
parent 4734a2e2b4
commit 89eca9eebc
5 changed files with 36 additions and 21 deletions

View File

@@ -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;