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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user