summaryrefslogtreecommitdiff
path: root/apps/plugins/mp3_encoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mp3_encoder.c')
-rw-r--r--apps/plugins/mp3_encoder.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index 06d28a344a..d26500819b 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -2137,15 +2137,13 @@ void set_scale_facs(int *mdct_freq)
2137void compress(void) 2137void compress(void)
2138{ 2138{
2139 int i, gr, gr_cnt; 2139 int i, gr, gr_cnt;
2140 char stg[20];
2141 uint32_t max; 2140 uint32_t max;
2142 2141
2143 while(1) 2142 while(1)
2144 { 2143 {
2145 if((frames & 7) == 0) 2144 if((frames & 7) == 0)
2146 { rb->lcd_clear_display(); 2145 { rb->lcd_clear_display();
2147 rb->snprintf(stg, 20, "Frame %d / %d", frames, wav_size/SAMPL2/8); 2146 rb->lcd_putsxyf(4, 20, "Frame %d / %d", frames, wav_size/SAMPL2/8);
2148 rb->lcd_putsxy(4, 20, stg);
2149 rb->lcd_update(); 2147 rb->lcd_update();
2150 } 2148 }
2151 /* encode one mp3 frame in this loop */ 2149 /* encode one mp3 frame in this loop */
@@ -2496,7 +2494,6 @@ enum plugin_status plugin_start(const void* parameter)
2496 int rat, srat, nrat; /* for rate selection */ 2494 int rat, srat, nrat; /* for rate selection */
2497 int cont = 1, butt; 2495 int cont = 1, butt;
2498 long tim = 0; 2496 long tim = 0;
2499 char stg[40];
2500 static const char* bstrg[] = { 2497 static const char* bstrg[] = {
2501 "64", "80", "96", "112", "128", "160", "192", "224", "256", "320" 2498 "64", "80", "96", "112", "128", "160", "192", "224", "256", "320"
2502 }; 2499 };
@@ -2568,18 +2565,15 @@ enum plugin_status plugin_start(const void* parameter)
2568 else 2565 else
2569 { 2566 {
2570 rb->close(wavfile); 2567 rb->close(wavfile);
2571 rb->snprintf(stg, 20, "WaveOpen failed %d", wave_open()); 2568 rb->lcd_putsxyf(0, 20, "WaveOpen failed %d", wave_open());
2572 rb->lcd_putsxy(0, 20, stg);
2573 rb->lcd_update(); 2569 rb->lcd_update();
2574 rb->sleep(5*HZ); 2570 rb->sleep(5*HZ);
2575 } 2571 }
2576 2572
2577 rb->lcd_clear_display(); 2573 rb->lcd_clear_display();
2578 rb->snprintf(stg, 30, " Conversion: %ld.%02lds ", tim/100, tim%100); 2574 rb->lcd_putsxyf(0, 30, " Conversion: %ld.%02lds ", tim/100, tim%100);
2579 rb->lcd_putsxy(0, 30, stg);
2580 tim = frames * SAMP_PER_FRAME * 100 / 44100; /* unit=.01s */ 2575 tim = frames * SAMP_PER_FRAME * 100 / 44100; /* unit=.01s */
2581 rb->snprintf(stg, 30, " WAV-Length: %ld.%02lds ", tim/100, tim%100); 2576 rb->lcd_putsxyf(0, 20, " WAV-Length: %ld.%02lds ", tim/100, tim%100);
2582 rb->lcd_putsxy(0, 20, stg);
2583 rb->lcd_update(); 2577 rb->lcd_update();
2584 rb->sleep(5*HZ); 2578 rb->sleep(5*HZ);
2585 } 2579 }