mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-16 11:37:38 -04:00
Add and improve logfing, fix a possible cause of problems due to abuse of read_next_metadata
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9628 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d6b370be02
commit
af09d22125
1 changed files with 14 additions and 14 deletions
|
@ -1085,7 +1085,7 @@ static void audio_read_file(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tracks[track_widx].filerem == 0) {
|
if (tracks[track_widx].filerem == 0) {
|
||||||
logf("Finished buf.");
|
logf("Finished buf:%dB", tracks[track_widx].filesize);
|
||||||
strip_id3v1_tag();
|
strip_id3v1_tag();
|
||||||
close(current_fd);
|
close(current_fd);
|
||||||
current_fd = -1;
|
current_fd = -1;
|
||||||
|
@ -1097,7 +1097,10 @@ static void audio_read_file(void)
|
||||||
* of data, stop filling after this track */
|
* of data, stop filling after this track */
|
||||||
if (filling_short && filebufused > conf_watermark * 2)
|
if (filling_short && filebufused > conf_watermark * 2)
|
||||||
fill_bytesleft = 0;
|
fill_bytesleft = 0;
|
||||||
} else { logf("Partially buf:%d", tracks[track_widx].available); }
|
} else {
|
||||||
|
logf("Partially buf:%dB",
|
||||||
|
tracks[track_widx].filesize - tracks[track_widx].filerem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void codec_discard_codec_callback(void)
|
static void codec_discard_codec_callback(void)
|
||||||
|
@ -1430,6 +1433,7 @@ static bool audio_load_track(int offset, bool start_play)
|
||||||
if (start_play)
|
if (start_play)
|
||||||
codec_track_changed();
|
codec_track_changed();
|
||||||
|
|
||||||
|
logf("arf:%s", trackname);
|
||||||
audio_read_file();
|
audio_read_file();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1599,24 +1603,20 @@ static void audio_fill_file_buffer(
|
||||||
else if (!audio_load_track(offset, start_play))
|
else if (!audio_load_track(offset, start_play))
|
||||||
fill_bytesleft = 0;
|
fill_bytesleft = 0;
|
||||||
|
|
||||||
/* Read next unbuffered track's metadata as soon as playback begins */
|
/* If we're done buffering */
|
||||||
if (pcm_is_playing() || fill_bytesleft == 0)
|
if (fill_bytesleft == 0)
|
||||||
{
|
{
|
||||||
read_next_metadata();
|
read_next_metadata();
|
||||||
|
|
||||||
/* If we're done buffering */
|
generate_postbuffer_events();
|
||||||
if (fill_bytesleft == 0)
|
filling = false;
|
||||||
{
|
filling_short = false;
|
||||||
generate_postbuffer_events();
|
pcmbuf_set_boost_mode(false);
|
||||||
filling = false;
|
|
||||||
filling_short = false;
|
|
||||||
pcmbuf_set_boost_mode(false);
|
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
if (playing)
|
if (playing)
|
||||||
ata_sleep();
|
ata_sleep();
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue