diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2008-02-24 19:12:15 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2008-02-24 19:12:15 +0000 |
commit | 87842ca0e70ec866964b19655da54497e98bd710 (patch) | |
tree | f43cd0f5e537a6f6bf28e77c6d838b9e31d7dc89 | |
parent | 2279d95efecbdfa6118f390f6bbd3d6e28b7fc1a (diff) |
Change to (or add) 'standard' codec startup delay, fixing potential startup problems for APE and MPC files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16410 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/aiff.c | 4 | ||||
-rw-r--r-- | apps/codecs/ape.c | 6 | ||||
-rw-r--r-- | apps/codecs/mpc.c | 3 | ||||
-rw-r--r-- | apps/codecs/sid.c | 4 |
4 files changed, 10 insertions, 7 deletions
diff --git a/apps/codecs/aiff.c b/apps/codecs/aiff.c index 93a7c39489..8b90f7fe9c 100644 --- a/apps/codecs/aiff.c +++ b/apps/codecs/aiff.c @@ -72,8 +72,8 @@ next_track: goto exit; } - while (!*ci->taginfo_ready) - ci->yield(); + while (!*ci->taginfo_ready && !ci->stop_codec) + ci->sleep(1); codec_set_replaygain(ci->id3); diff --git a/apps/codecs/ape.c b/apps/codecs/ape.c index 6679a1a307..76c1d1af8d 100644 --- a/apps/codecs/ape.c +++ b/apps/codecs/ape.c @@ -164,6 +164,9 @@ enum codec_status codec_main(void) goto exit; } + while (!*ci->taginfo_ready && !ci->stop_codec) + ci->sleep(1); + inbuffer = ci->request_buffer(&bytesleft, INPUT_CHUNKSIZE); /* Read the file headers to populate the ape_ctx struct */ @@ -198,9 +201,6 @@ enum codec_status codec_main(void) (ape_ctx.seektablefilepos + ape_ctx.numseekpoints * sizeof(uint32_t))); - while (!*ci->taginfo_ready && !ci->stop_codec) - ci->sleep(1); - ci->configure(DSP_SWITCH_FREQUENCY, ape_ctx.samplerate); ci->configure(DSP_SET_STEREO_MODE, ape_ctx.channels == 1 ? STEREO_MONO : STEREO_NONINTERLEAVED); diff --git a/apps/codecs/mpc.c b/apps/codecs/mpc.c index 207a09445f..c74c10ee64 100644 --- a/apps/codecs/mpc.c +++ b/apps/codecs/mpc.c @@ -98,6 +98,9 @@ next_track: goto exit; } + while (!*ci->taginfo_ready && !ci->stop_codec) + ci->sleep(1); + samplesdone = ci->id3->offset; /* read file's streaminfo data */ diff --git a/apps/codecs/sid.c b/apps/codecs/sid.c index bb43aef680..1a1e912354 100644 --- a/apps/codecs/sid.c +++ b/apps/codecs/sid.c @@ -1221,8 +1221,8 @@ next_track: return CODEC_ERROR; } - while (!*ci->taginfo_ready) - ci->yield(); + while (!*ci->taginfo_ready && !ci->stop_codec) + ci->sleep(1); codec_set_replaygain(ci->id3); |