1
0
Fork 0
forked from len0rd/rockbox

Fixed crossfading.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7022 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2005-07-05 07:25:55 +00:00
parent 72550d94b6
commit aa30f0483b
2 changed files with 6 additions and 4 deletions

View file

@ -873,6 +873,7 @@ bool audio_load_track(int offset, bool start_play, int peek_offset)
return false; return false;
} }
} }
tracks[track_widx].id3.elapsed = 0;
/* Starting playback from an offset is only support in MPA at the moment */ /* Starting playback from an offset is only support in MPA at the moment */
if (offset > 0) { if (offset > 0) {
@ -1436,7 +1437,7 @@ void codec_thread(void)
struct mp3entry* audio_current_track(void) struct mp3entry* audio_current_track(void)
{ {
logf("audio_current_track"); // logf("audio_current_track");
if (track_count > 0 && cur_ti->taginfo_ready) if (track_count > 0 && cur_ti->taginfo_ready)
return (struct mp3entry *)&cur_ti->id3; return (struct mp3entry *)&cur_ti->id3;
@ -1515,7 +1516,7 @@ void audio_resume(void)
static void initiate_track_change(int peek_index) static void initiate_track_change(int peek_index)
{ {
if (!playlist_check(peek_index)) if (!playlist_check(peek_index))
return ; return ;
new_track = peek_index; new_track = peek_index;
ci.reload_codec = true; ci.reload_codec = true;

View file

@ -431,7 +431,8 @@ bool pcm_is_lowdata(void)
bool pcm_crossfade_init(void) bool pcm_crossfade_init(void)
{ {
if (PCMBUF_SIZE - audiobuffer_free < CHUNK_SIZE * 8 || !crossfade_enabled) { if (PCMBUF_SIZE - audiobuffer_free < CHUNK_SIZE * 8 || !crossfade_enabled
|| crossfade_active) {
return false; return false;
} }
logf("crossfading!"); logf("crossfading!");