summaryrefslogtreecommitdiff
path: root/apps/plugins/xxx2wav.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/xxx2wav.h')
-rw-r--r--apps/plugins/xxx2wav.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/plugins/xxx2wav.h b/apps/plugins/xxx2wav.h
index 96942824fd..1b93cf9d31 100644
--- a/apps/plugins/xxx2wav.h
+++ b/apps/plugins/xxx2wav.h
@@ -55,7 +55,7 @@ void* malloc(size_t size) {
55 x=&mallocbuf[mem_ptr]; 55 x=&mallocbuf[mem_ptr];
56 mem_ptr+=size+(size%4); // Keep memory 32-bit aligned (if it was already?) 56 mem_ptr+=size+(size%4); // Keep memory 32-bit aligned (if it was already?)
57 57
58 rb->snprintf(s,30,"Memory used: %d\r",mem_ptr); 58 rb->snprintf(s,30,"Memory used: %d",mem_ptr);
59 rb->lcd_putsxy(0,80,s); 59 rb->lcd_putsxy(0,80,s);
60 rb->lcd_update(); 60 rb->lcd_update();
61 return(x); 61 return(x);
@@ -111,11 +111,11 @@ void display_status(file_info_struct* file_info) {
111 unsigned long long speed; 111 unsigned long long speed;
112 unsigned long xspeed; 112 unsigned long xspeed;
113 113
114 rb->snprintf(s,32,"Bytes read: %d\r",file_info->curpos); 114 rb->snprintf(s,32,"Bytes read: %d",file_info->curpos);
115 rb->lcd_putsxy(0,0,s); 115 rb->lcd_putsxy(0,0,s);
116 rb->snprintf(s,32,"Samples Decoded: %d\r",file_info->current_sample); 116 rb->snprintf(s,32,"Samples Decoded: %d",file_info->current_sample);
117 rb->lcd_putsxy(0,20,s); 117 rb->lcd_putsxy(0,20,s);
118 rb->snprintf(s,32,"Frames Decoded: %d\r",file_info->frames_decoded); 118 rb->snprintf(s,32,"Frames Decoded: %d",file_info->frames_decoded);
119 rb->lcd_putsxy(0,40,s); 119 rb->lcd_putsxy(0,40,s);
120 120
121 ticks_taken=*(rb->current_tick)-file_info->start_tick; 121 ticks_taken=*(rb->current_tick)-file_info->start_tick;
@@ -154,7 +154,7 @@ static unsigned char wav_header[44]={'R','I','F','F', // 0 - ChunkID
154 }; 154 };
155 155
156 156
157int local_init(char* file, file_info_struct* file_info) { 157int local_init(char* infilename, char* outfilename, file_info_struct* file_info) {
158 char s[32]; 158 char s[32];
159 int i,n,bytesleft; 159 int i,n,bytesleft;
160 160
@@ -163,14 +163,15 @@ int local_init(char* file, file_info_struct* file_info) {
163 mallocbuf=mp3buf; 163 mallocbuf=mp3buf;
164 filebuf=&mp3buf[MALLOC_BUFSIZE]; 164 filebuf=&mp3buf[MALLOC_BUFSIZE];
165 165
166 rb->snprintf(s,32,"mp3 bufsize: %d\r",bufsize); 166 rb->snprintf(s,32,"mp3 bufsize: %d",bufsize);
167 rb->lcd_putsxy(0,100,s); 167 rb->lcd_putsxy(0,100,s);
168 rb->lcd_update(); 168 rb->lcd_update();
169 169
170 file_info->infile=rb->open(file,O_RDONLY); 170 file_info->infile=rb->open(infilename,O_RDONLY);
171 file_info->outfile=rb->creat("/ac3test.wav",O_WRONLY); 171 file_info->outfile=rb->creat(outfilename,O_WRONLY);
172 rb->write(file_info->outfile,wav_header,sizeof(wav_header)); 172 rb->write(file_info->outfile,wav_header,sizeof(wav_header));
173 file_info->curpos=0; 173 file_info->curpos=0;
174 file_info->current_sample=0;
174 file_info->frames_decoded=0; 175 file_info->frames_decoded=0;
175 file_info->filesize=rb->filesize(file_info->infile); 176 file_info->filesize=rb->filesize(file_info->infile);
176 177