diff options
author | Max Kellermann <max@duempel.org> | 2009-02-02 18:02:52 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-02 18:02:52 +0100 |
commit | 96e9b442255365f73a8efcbaeb118ff56dfd8318 (patch) | |
tree | 3eafde01d11fa20e2d0815156220635a8fa8d01f | |
parent | 38fa9124e8c5b02dbc7d9673a04eb3d5f5852033 (diff) | |
download | mpd-96e9b442255365f73a8efcbaeb118ff56dfd8318.tar.gz mpd-96e9b442255365f73a8efcbaeb118ff56dfd8318.tar.xz mpd-96e9b442255365f73a8efcbaeb118ff56dfd8318.zip |
player_thread: set player error when output device fails
When the output device fails to play a chunk, set pc.error to
PLAYER_ERROR_AUDIO. This way, the playlist knows that it should not
queue the next song.
Diffstat (limited to '')
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/player_thread.c | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -8,6 +8,7 @@ ver 0.14.2 (2009/??/??) - jack: clear "shutdown" flag on reconnect - jack: reduced sleep time to 1ms * mapper: remove trailing slashes from music_directory +* player: set player error when output device fails ver 0.14.1 (2009/01/17) diff --git a/src/player_thread.c b/src/player_thread.c index 50e097a24..06a5ff3bb 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -251,8 +251,11 @@ play_chunk(struct song *song, struct music_chunk *chunk, pcm_volume(chunk->data, chunk->length, format, pc.software_volume); - if (!playAudio(chunk->data, chunk->length)) + if (!playAudio(chunk->data, chunk->length)) { + pc.errored_song = dc.current_song; + pc.error = PLAYER_ERROR_AUDIO; return -1; + } pc.total_play_time += sizeToTime * chunk->length; return 0; |