diff options
author | Max Kellermann <max@duempel.org> | 2008-10-29 22:17:42 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-29 22:17:42 +0100 |
commit | 678314534a08dbcbc1c642446f1af899a2108b57 (patch) | |
tree | 494d6e0c776bb914b560f29717f19802daefff53 /src/player_thread.c | |
parent | 07bb46de88a6af3547d40452771e687a45592404 (diff) | |
download | mpd-678314534a08dbcbc1c642446f1af899a2108b57.tar.gz mpd-678314534a08dbcbc1c642446f1af899a2108b57.tar.xz mpd-678314534a08dbcbc1c642446f1af899a2108b57.zip |
output: always call cancel() before stop()
Stopping an audio output device without cancelling its buffer doesn't
make sense. Combine the two operations, which saves several cancel
calls.
Diffstat (limited to '')
-rw-r--r-- | src/player_thread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/player_thread.c b/src/player_thread.c index 0275b680a..48702b6a3 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -152,7 +152,6 @@ static void processDecodeInput(struct player *player) case PLAYER_COMMAND_PAUSE: player->paused = !player->paused; if (player->paused) { - dropBufferedAudio(); audio_output_pause_all(); pc.state = PLAYER_STATE_PAUSE; } else { @@ -298,10 +297,9 @@ static void do_play(void) break; } - if (player.paused) { - dropBufferedAudio(); + if (player.paused) closeAudioDevice(); - } + pc.totalTime = dc.totalTime; pc.audio_format = dc.audioFormat; play_audio_format = ob.audioFormat; |