summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2007-04-11 21:24:33 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2007-04-11 21:24:33 +0000
commit81cf65e496b94e12d962bbaf59b166244737bb3a (patch)
treed718dc7aecc29275dde1cf87a43d3853a292947c /apps
parentfad79dc6364e1e0d42216f4636a4fc504a594307 (diff)
downloadrockbox-81cf65e496b94e12d962bbaf59b166244737bb3a.tar.gz
rockbox-81cf65e496b94e12d962bbaf59b166244737bb3a.zip
Wavview plugin: minor speed increase
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13111 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/wavview.c21
1 files changed, 11 insertions, 10 deletions
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