From 89893faa19aef5623b8d4ea9e71b346edbd78435 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Nov 2009 20:02:19 +0100 Subject: decoder_control: merge next_song and current_song These two variables are redundant, we need only one of them. --- src/decoder_control.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/decoder_control.h') diff --git a/src/decoder_control.h b/src/decoder_control.h index f3bd26d53..a70adff05 100644 --- a/src/decoder_control.h +++ b/src/decoder_control.h @@ -72,8 +72,13 @@ struct decoder_control { /** the format being sent to the music pipe */ struct audio_format out_audio_format; - const struct song *current_song; - const struct song *next_song; + /** + * The song currently being decoded. This attribute is set by + * the player thread, when it sends the #DECODE_COMMAND_START + * command. + */ + const struct song *song; + float total_time; /** the #music_chunk allocator */ @@ -198,7 +203,7 @@ decoder_current_song(const struct decoder_control *dc) case DECODE_STATE_START: case DECODE_STATE_DECODE: - return dc->current_song; + return dc->song; } assert(false); -- cgit v1.2.3