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:
parent
fdb80e74b7
commit
4b7c28f98e
1
NEWS
1
NEWS
|
@ -44,6 +44,7 @@ ver 0.14.2 (2009/??/??)
|
||||||
- jack: clear "shutdown" flag on reconnect
|
- jack: clear "shutdown" flag on reconnect
|
||||||
- jack: reduced sleep time to 1ms
|
- jack: reduced sleep time to 1ms
|
||||||
* mapper: remove trailing slashes from music_directory
|
* mapper: remove trailing slashes from music_directory
|
||||||
|
* player: set player error when output device fails
|
||||||
|
|
||||||
|
|
||||||
ver 0.14.1 (2009/01/17)
|
ver 0.14.1 (2009/01/17)
|
||||||
|
|
|
@ -268,8 +268,11 @@ play_chunk(struct song *song, struct music_chunk *chunk,
|
||||||
pcm_volume(chunk->data, chunk->length,
|
pcm_volume(chunk->data, chunk->length,
|
||||||
format, pc.software_volume);
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
pc.total_play_time += sizeToTime * chunk->length;
|
pc.total_play_time += sizeToTime * chunk->length;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue