mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 07:02:31 -05:00
Make track info update in a smarter way
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9782 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d461a3ef65
commit
e0f7ecbfd8
1 changed files with 8 additions and 3 deletions
|
|
@ -1577,7 +1577,6 @@ static bool read_next_metadata(void)
|
||||||
if (tracks[next_idx].id3.album)
|
if (tracks[next_idx].id3.album)
|
||||||
lcd_getstringsize(tracks[next_idx].id3.album, NULL, NULL);
|
lcd_getstringsize(tracks[next_idx].id3.album, NULL, NULL);
|
||||||
}
|
}
|
||||||
track_changed = true;
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
@ -1644,9 +1643,10 @@ static bool audio_load_track(int offset, bool start_play)
|
||||||
/* Get track metadata if we don't already have it. */
|
/* Get track metadata if we don't already have it. */
|
||||||
if (!tracks[track_widx].taginfo_ready) {
|
if (!tracks[track_widx].taginfo_ready) {
|
||||||
if (get_metadata(&tracks[track_widx],current_fd,trackname,v1first)) {
|
if (get_metadata(&tracks[track_widx],current_fd,trackname,v1first)) {
|
||||||
track_changed = true;
|
if (start_play) {
|
||||||
if (start_play)
|
track_changed = true;
|
||||||
playlist_update_resume_info(audio_current_track());
|
playlist_update_resume_info(audio_current_track());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
logf("mde:%s!",trackname);
|
logf("mde:%s!",trackname);
|
||||||
/* Set filesize to zero to indicate no file was loaded. */
|
/* Set filesize to zero to indicate no file was loaded. */
|
||||||
|
|
@ -1914,6 +1914,8 @@ static void initialize_buffer_fill(bool clear_tracks)
|
||||||
|
|
||||||
static void audio_fill_file_buffer(bool start_play, size_t offset)
|
static void audio_fill_file_buffer(bool start_play, size_t offset)
|
||||||
{
|
{
|
||||||
|
bool had_next_track = audio_next_track() != NULL;
|
||||||
|
|
||||||
initialize_buffer_fill(!start_play);
|
initialize_buffer_fill(!start_play);
|
||||||
|
|
||||||
/* If we have a partially buffered track, continue loading,
|
/* If we have a partially buffered track, continue loading,
|
||||||
|
|
@ -1923,6 +1925,9 @@ static void audio_fill_file_buffer(bool start_play, size_t offset)
|
||||||
else if (!audio_load_track(offset, start_play))
|
else if (!audio_load_track(offset, start_play))
|
||||||
fill_bytesleft = 0;
|
fill_bytesleft = 0;
|
||||||
|
|
||||||
|
if (!had_next_track && audio_next_track())
|
||||||
|
track_changed = true;
|
||||||
|
|
||||||
/* If we're done buffering */
|
/* If we're done buffering */
|
||||||
if (fill_bytesleft == 0)
|
if (fill_bytesleft == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue