From 8b44601a7c306611b9aba29a7774708585c97539 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 16 Oct 2007 08:34:51 +0000 Subject: Disable highperf mode in the peakmeter for swcodec targets, as it makes no sense. Improves responsiveness a lot with a peakmeter-enabled wps on targets with slow lcd updates (e.g. G5). Added a comment why highperf mode is needed for MAS targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15140 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/peakmeter.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index c4bf07146d..fe97bd83d2 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c @@ -1318,10 +1318,15 @@ int peak_meter_draw_get_btn(int x, int y[], int height, int nb_screens) long next_refresh = current_tick; long next_big_refresh = current_tick + HZ / 10; int i; -#ifndef SIMULATOR - bool highperf = !ata_disk_is_active(); -#else +#if (CONFIG_CODEC == SWCODEC) || defined(SIMULATOR) bool highperf = false; +#else + /* On MAS targets, we need to poll as often as possible in order to not + * miss a peak, as the MAS does only provide a quasi-peak. When the disk + * is active, it must not draw too much CPU power or a buffer overrun can + * happen when saving a recording. As a compromise, poll only once per tick + * when the disk is active, otherwise spin around as fast as possible. */ + bool highperf = !ata_disk_is_active(); #endif bool dopeek = true; -- cgit