diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2007-02-26 17:15:04 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2007-02-26 17:15:04 +0000 |
| commit | 9b9e22731c137ef3f3febde7d4a914e1adfe6253 (patch) | |
| tree | 4e6f98841be43af0004f97e6d827986279b6ff28 /apps/codecs | |
| parent | 94c02493a9f34a686655bd82dedba8c9a78cbc63 (diff) | |
| download | rockbox-9b9e22731c137ef3f3febde7d4a914e1adfe6253.zip rockbox-9b9e22731c137ef3f3febde7d4a914e1adfe6253.tar.gz rockbox-9b9e22731c137ef3f3febde7d4a914e1adfe6253.tar.bz2 rockbox-9b9e22731c137ef3f3febde7d4a914e1adfe6253.tar.xz | |
SWCODEC: Fix the problem of replaygain not being applied unless the menu is entered. Make all codecs set the replay gain or else formats that do not have replaygain will not set the gain back to default if a file with gain applied proceeded them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12498 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
| -rw-r--r-- | apps/codecs/a52.c | 3 | ||||
| -rw-r--r-- | apps/codecs/adx.c | 2 | ||||
| -rw-r--r-- | apps/codecs/aiff.c | 2 | ||||
| -rw-r--r-- | apps/codecs/nsf.c | 2 | ||||
| -rw-r--r-- | apps/codecs/shorten.c | 2 | ||||
| -rw-r--r-- | apps/codecs/sid.c | 2 | ||||
| -rw-r--r-- | apps/codecs/spc.c | 2 | ||||
| -rw-r--r-- | apps/codecs/wav.c | 2 |
8 files changed, 16 insertions, 1 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c index 23f5067..b2229d4 100644 --- a/apps/codecs/a52.c +++ b/apps/codecs/a52.c @@ -134,8 +134,9 @@ next_track: while (!ci->taginfo_ready) ci->yield(); - + ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + codec_set_replaygain(ci->id3); /* Intialise the A52 decoder and check for success */ state = a52_init(0); diff --git a/apps/codecs/adx.c b/apps/codecs/adx.c index 19d8110..337e07e 100644 --- a/apps/codecs/adx.c +++ b/apps/codecs/adx.c @@ -70,6 +70,8 @@ next_track: /* wait for track info to load */ while (!*ci->taginfo_ready && !ci->stop_codec) ci->sleep(1); + + codec_set_replaygain(ci->id3); /* Read the entire file (or as much as possible) */ DEBUGF("ADX: request initial buffer\n"); diff --git a/apps/codecs/aiff.c b/apps/codecs/aiff.c index 2e92d93..7cb471c 100644 --- a/apps/codecs/aiff.c +++ b/apps/codecs/aiff.c @@ -75,6 +75,8 @@ next_track: while (!*ci->taginfo_ready) ci->yield(); + + codec_set_replaygain(ci->id3); /* assume the AIFF header is less than 1024 bytes */ buf = ci->request_buffer(&n, 1024); diff --git a/apps/codecs/nsf.c b/apps/codecs/nsf.c index 0ca1275..6f81c6a 100644 --- a/apps/codecs/nsf.c +++ b/apps/codecs/nsf.c @@ -4344,6 +4344,8 @@ next_track: /* wait for track info to load */ while (!*ci->taginfo_ready && !ci->stop_codec) ci->sleep(1); + + codec_set_replaygain(ci->id3); /* Read the entire file */ DEBUGF("NSF: request file\n"); diff --git a/apps/codecs/shorten.c b/apps/codecs/shorten.c index dbfc272..004a407 100644 --- a/apps/codecs/shorten.c +++ b/apps/codecs/shorten.c @@ -61,6 +61,8 @@ next_track: while (!*ci->taginfo_ready) ci->yield(); + codec_set_replaygain(ci->id3); + /* Shorten decoder initialization */ ci->memset(&sc, 0, sizeof(ShortenContext)); diff --git a/apps/codecs/sid.c b/apps/codecs/sid.c index 7c53e8f..1c98714 100644 --- a/apps/codecs/sid.c +++ b/apps/codecs/sid.c @@ -1226,6 +1226,8 @@ next_track: while (!*ci->taginfo_ready) ci->yield(); + + codec_set_replaygain(ci->id3); /* Load SID file */ p = sidfile; diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c index 8d621dd..12b236c 100644 --- a/apps/codecs/spc.c +++ b/apps/codecs/spc.c @@ -829,6 +829,8 @@ enum codec_status codec_main(void) while (!*ci->taginfo_ready && !ci->stop_codec) ci->sleep(1); + codec_set_replaygain(ci->id3); + /* Read the entire file */ DEBUGF("SPC: request initial buffer\n"); ci->configure(CODEC_SET_FILEBUF_WATERMARK, ci->filesize); diff --git a/apps/codecs/wav.c b/apps/codecs/wav.c index b4eaaef..94099c5 100644 --- a/apps/codecs/wav.c +++ b/apps/codecs/wav.c @@ -237,6 +237,8 @@ next_track: while (!*ci->taginfo_ready && !ci->stop_codec) ci->sleep(1); + + codec_set_replaygain(ci->id3); /* Need to save offset for later use (cleared indirectly by advance_buffer) */ bytesdone = ci->id3->offset; |