summaryrefslogtreecommitdiff
path: root/apps/plugins/wavrecord.c
diff options
context:
space:
mode:
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 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,
3480static int record_file(char *filename) 3480static int record_file(char *filename)
3481{ 3481{
3482 bool recording, saving; 3482 bool recording, saving;
3483 char buf[32];
3484 int fd, low_water, i; 3483 int fd, low_water, i;
3485 int bytes_written; 3484 int bytes_written;
3486 int button; 3485 int button;
@@ -3514,8 +3513,6 @@ static int record_file(char *filename)
3514 3513
3515 rb->lcd_clear_display(); 3514 rb->lcd_clear_display();
3516 rb->lcd_puts(0, 0, filename); 3515 rb->lcd_puts(0, 0, filename);
3517 rb->snprintf(buf, sizeof(buf), "%sHz 16bit %s",
3518 samplerate_str[reccfg.samplerate], channel_str[reccfg.channels]);
3519 3516
3520 switch (reccfg.source) 3517 switch (reccfg.source)
3521 { 3518 {
@@ -3535,12 +3532,18 @@ static int record_file(char *filename)
3535#ifdef HAVE_SPDIF_REC 3532#ifdef HAVE_SPDIF_REC
3536 case WAV_SRC_SPDIF: 3533 case WAV_SRC_SPDIF:
3537 rb->mas_codec_writereg(0, 0x01); 3534 rb->mas_codec_writereg(0, 0x01);
3538 rb->snprintf(buf, sizeof(buf), "16bit %s",
3539 channel_str[reccfg.channels]);
3540 break; 3535 break;
3541#endif 3536#endif
3542 } 3537 }
3543 rb->lcd_puts(0, 1, buf); 3538
3539#ifdef HAVE_SPDIF_REC
3540 if (reccfg.source == WAV_SRC_SPDIF)
3541 rb->lcd_putsf(0, 1, "16bit %s", channel_str[reccfg.channels]);
3542 else
3543#endif
3544 rb->lcd_putsf(0, 1, "%sHz 16bit %s",
3545 samplerate_str[reccfg.samplerate], channel_str[reccfg.channels]);
3546
3544 rb->lcd_update(); 3547 rb->lcd_update();
3545 3548
3546 mas = 0x0060 /* no framing, little endian */ 3549 mas = 0x0060 /* no framing, little endian */
@@ -3649,8 +3652,7 @@ static int record_file(char *filename)
3649 recording = false; 3652 recording = false;
3650 saving = true; 3653 saving = true;
3651 } 3654 }
3652 rb->snprintf(buf, sizeof(buf), "Bytes: %d", num_rec_bytes); 3655 rb->lcd_puts(0, 2, "Bytes: %d", num_rec_bytes);
3653 rb->lcd_puts(0, 2, buf);
3654 rb->lcd_update(); 3656 rb->lcd_update();
3655 } 3657 }
3656 /* read sample rate from MAS */ 3658 /* read sample rate from MAS */