diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dsp.c | 5 | ||||
-rw-r--r-- | apps/playback.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/apps/dsp.c b/apps/dsp.c index 9cdc715109..29e103afb7 100644 --- a/apps/dsp.c +++ b/apps/dsp.c | |||
@@ -629,7 +629,10 @@ void dsp_set_eq_coefs(int band) | |||
629 | cutoff = 0xffffffff / NATIVE_FREQUENCY * (*setting++); | 629 | cutoff = 0xffffffff / NATIVE_FREQUENCY * (*setting++); |
630 | q = ((*setting++) << 16) / 10; /* 16.16 */ | 630 | q = ((*setting++) << 16) / 10; /* 16.16 */ |
631 | gain = ((*setting++) << 16) / 10; /* s15.16 */ | 631 | gain = ((*setting++) << 16) / 10; /* s15.16 */ |
632 | 632 | ||
633 | if (q == 0) | ||
634 | q = 1; | ||
635 | |||
633 | /* The coef functions assume the EMAC unit is in fractional mode */ | 636 | /* The coef functions assume the EMAC unit is in fractional mode */ |
634 | #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) | 637 | #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) |
635 | /* set emac unit for dsp processing, and save old macsr, we're running in | 638 | /* set emac unit for dsp processing, and save old macsr, we're running in |
diff --git a/apps/playback.c b/apps/playback.c index eab6fd104f..9f8fc5a71b 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -2359,8 +2359,11 @@ static void mp3_set_elapsed(struct mp3entry* id3) | |||
2359 | } | 2359 | } |
2360 | } | 2360 | } |
2361 | else | 2361 | else |
2362 | { | ||
2362 | /* constant bitrate, use exact calculation */ | 2363 | /* constant bitrate, use exact calculation */ |
2363 | id3->elapsed = id3->offset / (id3->bitrate / 8); | 2364 | if (id3->bitrate != 0) |
2365 | id3->elapsed = id3->offset / (id3->bitrate / 8); | ||
2366 | } | ||
2364 | } | 2367 | } |
2365 | 2368 | ||
2366 | /* Copied from mpeg.c. Should be moved somewhere else. */ | 2369 | /* Copied from mpeg.c. Should be moved somewhere else. */ |