From ab9fd1840b8025336081bd72fb9dbaea7b9909dd Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sat, 28 Aug 2010 21:46:45 +0000 Subject: plugins: use lcd_putsf/lcd_putsxyf git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27926 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/wavrecord.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'apps/plugins/wavrecord.c') diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index 375642ec4b..91ce9c92f6 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c @@ -3480,7 +3480,6 @@ static bool update_wav_header(char *filename, int sample_rate, static int record_file(char *filename) { bool recording, saving; - char buf[32]; int fd, low_water, i; int bytes_written; int button; @@ -3514,8 +3513,6 @@ static int record_file(char *filename) rb->lcd_clear_display(); rb->lcd_puts(0, 0, filename); - rb->snprintf(buf, sizeof(buf), "%sHz 16bit %s", - samplerate_str[reccfg.samplerate], channel_str[reccfg.channels]); switch (reccfg.source) { @@ -3535,12 +3532,18 @@ static int record_file(char *filename) #ifdef HAVE_SPDIF_REC case WAV_SRC_SPDIF: rb->mas_codec_writereg(0, 0x01); - rb->snprintf(buf, sizeof(buf), "16bit %s", - channel_str[reccfg.channels]); break; #endif } - rb->lcd_puts(0, 1, buf); + +#ifdef HAVE_SPDIF_REC + if (reccfg.source == WAV_SRC_SPDIF) + rb->lcd_putsf(0, 1, "16bit %s", channel_str[reccfg.channels]); + else +#endif + rb->lcd_putsf(0, 1, "%sHz 16bit %s", + samplerate_str[reccfg.samplerate], channel_str[reccfg.channels]); + rb->lcd_update(); mas = 0x0060 /* no framing, little endian */ @@ -3649,8 +3652,7 @@ static int record_file(char *filename) recording = false; saving = true; } - rb->snprintf(buf, sizeof(buf), "Bytes: %d", num_rec_bytes); - rb->lcd_puts(0, 2, buf); + rb->lcd_puts(0, 2, "Bytes: %d", num_rec_bytes); rb->lcd_update(); } /* read sample rate from MAS */ -- cgit v1.2.3