From 81cf65e496b94e12d962bbaf59b166244737bb3a Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Wed, 11 Apr 2007 21:24:33 +0000 Subject: Wavview plugin: minor speed increase git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13111 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/wavview.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'apps/plugins/wavview.c') diff --git a/apps/plugins/wavview.c b/apps/plugins/wavview.c index e848807d53..b56a379a43 100644 --- a/apps/plugins/wavview.c +++ b/apps/plugins/wavview.c @@ -102,18 +102,19 @@ void little_endian_to_native (void *data, char *format) store peak info in aufiobuf for display routine */ static int readwavpeaks(char *filename) { + register uint32_t bytes_read; + register uint32_t fppmp_count; + register int16_t sampleval; + register uint16_t* sampleshort = NULL; + int file; uint32_t total_bytes_read = 0; char tstr[128]; int hours; int minutes; int seconds; - uint32_t bytes_read; uint32_t peakcount = 0; - uint16_t* sampleshort = NULL; - int16_t sampleval; struct peakstruct* peak = NULL; - uint32_t fppmp_count; if(rb->strcasecmp (filename + rb->strlen (filename) - 3, "wav")) { @@ -270,12 +271,12 @@ static int readwavpeaks(char *filename) int displaypeaks(void) { - int x = 0; - int lymin = INT_MAX; - int lymax = INT_MIN; - int rymin = INT_MAX; - int rymax = INT_MIN; - unsigned int peakcount = 0; + register int x = 0; + register int lymin = INT_MAX; + register int lymax = INT_MIN; + register int rymin = INT_MAX; + register int rymax = INT_MIN; + register unsigned int peakcount = 0; struct peakstruct* peak = (struct peakstruct*)audiobuf + leftmargin; #if LCD_DEPTH > 1 -- cgit