summaryrefslogtreecommitdiffstats
path: root/apps/plugins/mp3_encoder.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-08-28 21:46:45 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-08-28 21:46:45 +0000
commitab9fd1840b8025336081bd72fb9dbaea7b9909dd (patch)
tree4c410bffcf1a9de2ce55a59bef45e3ecfa183a62 /apps/plugins/mp3_encoder.c
parent8418a2c94a97da1d6f42f21dc348aadd1e177d77 (diff)
downloadrockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.gz
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.zip
plugins: use lcd_putsf/lcd_putsxyf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27926 a1c6a512-1295-4272-9138-f99709370657
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)
void compress(void)
{
int i, gr, gr_cnt;
- char stg[20];
uint32_t max;
while(1)
{
if((frames & 7) == 0)
{ rb->lcd_clear_display();
- rb->snprintf(stg, 20, "Frame %d / %d", frames, wav_size/SAMPL2/8);
- rb->lcd_putsxy(4, 20, stg);
+ rb->lcd_putsxyf(4, 20, "Frame %d / %d", frames, wav_size/SAMPL2/8);
rb->lcd_update();
}
/* encode one mp3 frame in this loop */
@@ -2496,7 +2494,6 @@ enum plugin_status plugin_start(const void* parameter)
int rat, srat, nrat; /* for rate selection */
int cont = 1, butt;
long tim = 0;
- char stg[40];
static const char* bstrg[] = {
"64", "80", "96", "112", "128", "160", "192", "224", "256", "320"
};
@@ -2568,18 +2565,15 @@ enum plugin_status plugin_start(const void* parameter)
else
{
rb->close(wavfile);
- rb->snprintf(stg, 20, "WaveOpen failed %d", wave_open());
- rb->lcd_putsxy(0, 20, stg);
+ rb->lcd_putsxyf(0, 20, "WaveOpen failed %d", wave_open());
rb->lcd_update();
rb->sleep(5*HZ);
}
rb->lcd_clear_display();
- rb->snprintf(stg, 30, " Conversion: %ld.%02lds ", tim/100, tim%100);
- rb->lcd_putsxy(0, 30, stg);
+ rb->lcd_putsxyf(0, 30, " Conversion: %ld.%02lds ", tim/100, tim%100);
tim = frames * SAMP_PER_FRAME * 100 / 44100; /* unit=.01s */
- rb->snprintf(stg, 30, " WAV-Length: %ld.%02lds ", tim/100, tim%100);
- rb->lcd_putsxy(0, 20, stg);
+ rb->lcd_putsxyf(0, 20, " WAV-Length: %ld.%02lds ", tim/100, tim%100);
rb->lcd_update();
rb->sleep(5*HZ);
}