summaryrefslogtreecommitdiff
path: root/apps/recorder/recording.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-05-11 22:55:24 +0000
committerThom Johansen <thomj@rockbox.org>2006-05-11 22:55:24 +0000
commita4bfe37c6cdcc2e70b2b6d5d486531fa2986370b (patch)
tree24f01ed56d3197d66e2f66cabbd4a9814ce14b72 /apps/recorder/recording.c
parent5725b8cbcbe11c006fe92874dcc5d834e006daa6 (diff)
Optical S/PDIF recording and monitoring for Iriver H1x0. Removed unsupported recording options on Iriver. Sample rate displayed in recording screen reflects the real S/PDIF sample rate when doing S/PDIF recording. Testing would be appreciated. Thanks to Jens Arnold for fixing the DMA hang issue. Will reset settings!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9916 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r--apps/recorder/recording.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index cf361eea76..854e979ade 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -577,6 +577,11 @@ bool recording_screen(void)
#endif
talk_buffer_steal(); /* will use the mp3 buffer */
+#ifdef HAVE_SPDIF_POWER
+ /* Tell recording whether we want S/PDIF power enabled at all times */
+ audio_set_spdif_power_setting(global_settings.spdif_enable);
+#endif
+
audio_set_recording_options(global_settings.rec_frequency,
global_settings.rec_quality,
global_settings.rec_source,
@@ -1011,6 +1016,7 @@ bool recording_screen(void)
unsigned int dseconds, dhours, dminutes;
unsigned long num_recorded_bytes;
int pos = 0;
+ char spdif_sfreq[8];
update_countdown = 5;
last_seconds = seconds;
@@ -1259,12 +1265,21 @@ bool recording_screen(void)
2+PM_HEIGHT, true);
}
}
-
+/* Can't measure S/PDIF sample rate on Archos yet */
+#if CONFIG_CODEC != MAS3587F && defined(HAVE_SPDIF_IN)
+ if (global_settings.rec_source == SOURCE_SPDIF)
+ snprintf(spdif_sfreq, 8, "%dHz", audio_get_spdif_sample_rate());
+#else
+ (void)spdif_sfreq;
+#endif
snprintf(buf, 32, "%s %s",
+#if CONFIG_CODEC != MAS3587F && defined(HAVE_SPDIF_IN)
+ global_settings.rec_source == SOURCE_SPDIF ?
+ spdif_sfreq :
+#endif
freq_str[global_settings.rec_frequency],
- global_settings.rec_channels?
- str(LANG_CHANNEL_MONO):str(LANG_CHANNEL_STEREO));
-
+ global_settings.rec_channels ?
+ str(LANG_CHANNEL_MONO) : str(LANG_CHANNEL_STEREO));
FOR_NB_SCREENS(i)
screens[i].puts(0, 5+PM_HEIGHT, buf);