player: removed player_control.fileTime
This variable is superfluous, it is only used to copy its value to player_control.totalTime. Since the original source of this value (song->tag->time) will still be available at this point, we can safely remove fileTime.
This commit is contained in:
parent
dd7711d86c
commit
42409a35e2
@ -50,7 +50,6 @@ set_current_song(struct song *song)
|
|||||||
assert(song != NULL);
|
assert(song != NULL);
|
||||||
assert(song->url != NULL);
|
assert(song->url != NULL);
|
||||||
|
|
||||||
pc.fileTime = song->tag ? song->tag->time : 0;
|
|
||||||
pc.next_song = song;
|
pc.next_song = song;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,6 @@ struct player_control {
|
|||||||
struct audio_format audio_format;
|
struct audio_format audio_format;
|
||||||
volatile float totalTime;
|
volatile float totalTime;
|
||||||
volatile float elapsedTime;
|
volatile float elapsedTime;
|
||||||
volatile float fileTime;
|
|
||||||
struct song *volatile next_song;
|
struct song *volatile next_song;
|
||||||
struct song *errored_song;
|
struct song *errored_song;
|
||||||
volatile enum player_queue_state queueState;
|
volatile enum player_queue_state queueState;
|
||||||
|
@ -60,7 +60,8 @@ static int waitOnDecode(int *decodeWaitedOn)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc.totalTime = pc.fileTime;
|
pc.totalTime = pc.next_song->tag != NULL
|
||||||
|
? pc.next_song->tag->time : 0;
|
||||||
pc.bitRate = 0;
|
pc.bitRate = 0;
|
||||||
audio_format_clear(&pc.audio_format);
|
audio_format_clear(&pc.audio_format);
|
||||||
*decodeWaitedOn = 1;
|
*decodeWaitedOn = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user