diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/player_control.c | 8 | ||||
-rw-r--r-- | src/player_control.h | 8 | ||||
-rw-r--r-- | src/player_thread.c | 8 | ||||
-rw-r--r-- | src/playlist.c | 2 |
4 files changed, 14 insertions, 12 deletions
diff --git a/src/player_control.c b/src/player_control.c index f2e31fb37..32ceedbe2 100644 --- a/src/player_control.c +++ b/src/player_control.c @@ -47,7 +47,7 @@ pc_new(unsigned buffer_chunks, unsigned int buffered_before_play) pc->cond = g_cond_new(); pc->command = PLAYER_COMMAND_NONE; - pc->error = PLAYER_ERROR_NONE; + pc->error_type = PLAYER_ERROR_NONE; pc->state = PLAYER_STATE_STOP; pc->cross_fade_seconds = 0; pc->mixramp_db = 0; @@ -80,7 +80,7 @@ void pc_song_deleted(struct player_control *pc, const struct song *song) { if (pc->errored_song == song) { - pc->error = PLAYER_ERROR_NONE; + pc->error_type = PLAYER_ERROR_NONE; pc->errored_song = NULL; } } @@ -232,7 +232,7 @@ void pc_clear_error(struct player_control *pc) { player_lock(pc); - pc->error = PLAYER_ERROR_NONE; + pc->error_type = PLAYER_ERROR_NONE; pc->errored_song = NULL; player_unlock(pc); } @@ -249,7 +249,7 @@ pc_get_error_message(struct player_control *pc) char *error; char *uri; - switch (pc->error) { + switch (pc->error_type) { case PLAYER_ERROR_NONE: return NULL; diff --git a/src/player_control.h b/src/player_control.h index 5d1c0ba3b..228da90fa 100644 --- a/src/player_control.h +++ b/src/player_control.h @@ -108,7 +108,9 @@ struct player_control { enum player_command command; enum player_state state; - enum player_error error; + + enum player_error error_type; + uint16_t bit_rate; struct audio_format audio_format; float total_time; @@ -236,9 +238,9 @@ char * pc_get_error_message(struct player_control *pc); static inline enum player_error -pc_get_error(struct player_control *pc) +pc_get_error_type(struct player_control *pc) { - return pc->error; + return pc->error_type; } void diff --git a/src/player_thread.c b/src/player_thread.c index 102401d6d..a19e1db8e 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -238,7 +238,7 @@ player_wait_for_decoder(struct player *player) if (decoder_lock_has_failed(dc)) { player_lock(pc); pc->errored_song = dc->song; - pc->error = PLAYER_ERROR_DECODER; + pc->error_type = PLAYER_ERROR_DECODER; pc->next_song = NULL; player_unlock(pc); @@ -322,7 +322,7 @@ player_open_output(struct player *player) player->paused = true; player_lock(pc); - pc->error = PLAYER_ERROR_OUTPUT; + pc->error_type = PLAYER_ERROR_OUTPUT; pc->state = PLAYER_STATE_PAUSE; player_unlock(pc); @@ -353,7 +353,7 @@ player_check_decoder_startup(struct player *player) player_lock(pc); pc->errored_song = dc->song; - pc->error = PLAYER_ERROR_DECODER; + pc->error_type = PLAYER_ERROR_DECODER; player_unlock(pc); return false; @@ -789,7 +789,7 @@ play_next_chunk(struct player *player) player_lock(pc); - pc->error = PLAYER_ERROR_OUTPUT; + pc->error_type = PLAYER_ERROR_OUTPUT; /* pause: the user may resume playback as soon as an audio output becomes available */ diff --git a/src/playlist.c b/src/playlist.c index 6b8866941..b2cb90d2f 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -258,7 +258,7 @@ playlist_resume_playback(struct playlist *playlist, struct player_control *pc) assert(playlist->playing); assert(pc_get_state(pc) == PLAYER_STATE_STOP); - error = pc_get_error(pc); + error = pc_get_error_type(pc); if (error == PLAYER_ERROR_NONE) playlist->error_count = 0; else |