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.
This commit is contained in:
@@ -268,8 +268,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 false;
|
||||
}
|
||||
|
||||
pc.total_play_time += sizeToTime * chunk->length;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user