diff options
| author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-05 18:46:25 +0000 |
|---|---|---|
| committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-05 18:46:25 +0000 |
| commit | aef008b0617cc44d53161104720611d616224982 (patch) | |
| tree | b24259250ed564152ab37ec20169546e6da8b3ae /apps | |
| parent | 6631e36fa7ad200d1c92be88e9c5579a54288f71 (diff) | |
| download | rockbox-aef008b0617cc44d53161104720611d616224982.zip rockbox-aef008b0617cc44d53161104720611d616224982.tar.gz rockbox-aef008b0617cc44d53161104720611d616224982.tar.bz2 rockbox-aef008b0617cc44d53161104720611d616224982.tar.xz | |
Set all track handles to -1 on audio init to avoid calling bufclose(0) on all of them on the first playback stop. This also revealed a bug in audio_release_tracks where it wouldn't release all the tracks because the wrong #define value was used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15484 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playback.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c index 422eab9..42dbf56 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2105,7 +2105,7 @@ static bool audio_release_tracks(void) logf("releasing all tracks"); - for(i = 0; i < MAX_TRACKS; i++) + for(i = 0; i < MAX_TRACK; i++) { cur_idx = (track_ridx + i) & MAX_TRACK_MASK; if (!clear_track_info(&tracks[cur_idx])) @@ -3274,6 +3274,14 @@ void audio_init(void) /* ...now! Set up the buffers */ audio_reset_buffer(); + int i; + for(i = 0; i < MAX_TRACK; i++) + { + tracks[i].audio_hid = -1; + tracks[i].id3_hid = -1; + tracks[i].codec_hid = -1; + } + /* Probably safe to say */ audio_is_initialized = true; |