summaryrefslogtreecommitdiff
path: root/apps/recorder
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2010-01-03 13:32:16 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2010-01-03 13:32:16 +0000
commit1bc9228ac74e4df52f677c98c0afda2c3ab58378 (patch)
tree92749d119b700456e5ac7244b66f6048d6fee1ce /apps/recorder
parentb75b3e7557916a3fcb4c9337790ccaff61f224c4 (diff)
Disable speaker when recording to prevent feedback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24163 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/recording.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 0d1ada73f6..8b52b7cac2 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -1068,6 +1068,11 @@ bool recording_screen(bool no_source)
agc_preset_str[5] = str(LANG_AGC_VOICE);
#endif /* HAVE_AGC */
+#ifdef HAVE_SPEAKER
+ /* Disable speaker to prevent feedback */
+ audiohw_enable_speaker(false);
+#endif
+
#if CONFIG_CODEC == SWCODEC
audio_close_recording();
#endif
@@ -1903,6 +1908,11 @@ rec_abort:
audio_init_playback();
#endif /* CONFIG_CODEC == SWCODEC */
+#ifdef HAVE_SPEAKER
+ /* Re-enable speaker */
+ audiohw_enable_speaker(global_settings.speaker_enabled);
+#endif
+
/* make sure the trigger is really turned off */
peak_meter_trigger(false);
peak_meter_set_trigger_listener(NULL);