diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-04-22 14:40:13 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-04-22 14:40:13 +0000 |
commit | f3bc1efc49826454a895c1c1f46fbe2cfd23f492 (patch) | |
tree | 676d501a9e75a9420f07a13f1d7fc1c5820b432a /apps/codecs/mpa.c | |
parent | b5991b27cafa8cc8bd2e86e04110beec34a587e0 (diff) |
First commit of reworking voice to be mroe stable on swcodec
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9758 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/mpa.c')
-rw-r--r-- | apps/codecs/mpa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 7219095591..51038c5244 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c @@ -91,7 +91,7 @@ void init_mad(void) /* this is the codec entry point */ enum codec_status codec_start(struct codec_api *api) { - int status = CODEC_OK; + int status; size_t size; int file_end; int frame_skip; /* samples to skip current frame */ @@ -110,7 +110,6 @@ enum codec_status codec_start(struct codec_api *api) /* Create a decoder instance */ - ci->configure(CODEC_DSP_ENABLE, (bool *)true); ci->configure(DSP_DITHER, (bool *)false); ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(MAD_F_FRACBITS)); ci->configure(DSP_SET_CLIP_MIN, (int *)-MAD_F_ONE); @@ -122,6 +121,7 @@ enum codec_status codec_start(struct codec_api *api) * for gapless playback. * Reinitializing seems to be necessary to avoid playback quircks when seeking. */ next_track: + status = CODEC_OK; init_mad(); @@ -171,7 +171,7 @@ enum codec_status codec_start(struct codec_api *api) ci->id3->first_frame_offset; if (!ci->seek_buffer(newpos)) - goto next_track; + break; ci->seek_complete(); init_mad(); } @@ -192,7 +192,7 @@ enum codec_status codec_start(struct codec_api *api) break; /* Fill the buffer */ - if (stream.next_frame) + if (stream.next_frame && stream.next_frame != stream.this_frame) ci->advance_buffer_loc((void *)stream.next_frame); else ci->advance_buffer(size); |