summaryrefslogtreecommitdiff
path: root/apps/plugins/wavrecord.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/wavrecord.c
parent8418a2c94a97da1d6f42f21dc348aadd1e177d77 (diff)
downloadrockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.zip
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.gz
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.bz2
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.xz
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/wavrecord.c')
-rw-r--r--apps/plugins/wavrecord.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c
index 375642e..91ce9c9 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 */