forked from len0rd/rockbox
Wavview plugin: minor speed increase
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13111 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fad79dc636
commit
81cf65e496
1 changed files with 11 additions and 10 deletions
|
@ -102,18 +102,19 @@ void little_endian_to_native (void *data, char *format)
|
||||||
store peak info in aufiobuf for display routine */
|
store peak info in aufiobuf for display routine */
|
||||||
static int readwavpeaks(char *filename)
|
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;
|
int file;
|
||||||
uint32_t total_bytes_read = 0;
|
uint32_t total_bytes_read = 0;
|
||||||
char tstr[128];
|
char tstr[128];
|
||||||
int hours;
|
int hours;
|
||||||
int minutes;
|
int minutes;
|
||||||
int seconds;
|
int seconds;
|
||||||
uint32_t bytes_read;
|
|
||||||
uint32_t peakcount = 0;
|
uint32_t peakcount = 0;
|
||||||
uint16_t* sampleshort = NULL;
|
|
||||||
int16_t sampleval;
|
|
||||||
struct peakstruct* peak = NULL;
|
struct peakstruct* peak = NULL;
|
||||||
uint32_t fppmp_count;
|
|
||||||
|
|
||||||
if(rb->strcasecmp (filename + rb->strlen (filename) - 3, "wav"))
|
if(rb->strcasecmp (filename + rb->strlen (filename) - 3, "wav"))
|
||||||
{
|
{
|
||||||
|
@ -270,12 +271,12 @@ static int readwavpeaks(char *filename)
|
||||||
|
|
||||||
int displaypeaks(void)
|
int displaypeaks(void)
|
||||||
{
|
{
|
||||||
int x = 0;
|
register int x = 0;
|
||||||
int lymin = INT_MAX;
|
register int lymin = INT_MAX;
|
||||||
int lymax = INT_MIN;
|
register int lymax = INT_MIN;
|
||||||
int rymin = INT_MAX;
|
register int rymin = INT_MAX;
|
||||||
int rymax = INT_MIN;
|
register int rymax = INT_MIN;
|
||||||
unsigned int peakcount = 0;
|
register unsigned int peakcount = 0;
|
||||||
struct peakstruct* peak = (struct peakstruct*)audiobuf + leftmargin;
|
struct peakstruct* peak = (struct peakstruct*)audiobuf + leftmargin;
|
||||||
|
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue