Tell the player process (and thus also the decode process) to quit when
playback is stopped completely. This means the player process will no longer have to wake up 100 times per second to see if it's been told to start playing (the main process will just spawn a new player process when it needs to). On the downside, this means an extra pair of forks() and the re-initializing of the player and decode processes each time playback is restarted. git-svn-id: https://svn.musicpd.org/mpd/trunk@6446 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -786,7 +786,7 @@ int deleteFromPlaylist(int fd, int song)
|
||||
&& playlist.current == songOrder) {
|
||||
/*if(playlist.current>=playlist.length) return playerStop(fd);
|
||||
else return playPlaylistOrderNumber(fd,playlist.current); */
|
||||
playerStop(STDERR_FILENO);
|
||||
playerQuit(STDERR_FILENO);
|
||||
playlist_noGoToNext = 1;
|
||||
}
|
||||
|
||||
@@ -827,9 +827,8 @@ void deleteASongFromPlaylist(Song * song)
|
||||
int stopPlaylist(int fd)
|
||||
{
|
||||
DEBUG("playlist: stop\n");
|
||||
if (playerStop(fd) < 0)
|
||||
if (playerQuit(fd) < 0)
|
||||
return -1;
|
||||
playerCloseAudio();
|
||||
playlist.queued = -1;
|
||||
playlist_state = PLAYLIST_STATE_STOP;
|
||||
playlist_noGoToNext = 0;
|
||||
|
Reference in New Issue
Block a user