summaryrefslogtreecommitdiffstats
path: root/apps/recorder
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2011-12-20 22:02:35 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2011-12-20 22:02:35 +0000
commit01415ad1b7d2d62c87d2bd2f433928a4a45e7859 (patch)
tree706c5061394fb906c496ab0ff81e97698c526e7d /apps/recorder
parente6c85a6735d3a1952dda563ffeb19a77a77af1dd (diff)
downloadrockbox-01415ad1b7d2d62c87d2bd2f433928a4a45e7859.tar.gz
rockbox-01415ad1b7d2d62c87d2bd2f433928a4a45e7859.tar.bz2
rockbox-01415ad1b7d2d62c87d2bd2f433928a4a45e7859.zip
AGC: respect gain steps defined in audiohw_settings[]
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31387 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/recording.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 161b113bce..e3a976b7ac 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -381,13 +381,15 @@ static void change_recording_gain(bool increment, bool left, bool right)
#if defined(HAVE_LINE_REC) || defined(HAVE_FMRADIO_REC)
HAVE_LINE_REC_(case AUDIO_SRC_LINEIN:)
HAVE_FMRADIO_REC_(case AUDIO_SRC_FMRADIO:)
- if (left) global_settings.rec_left_gain += factor;
- if (right) global_settings.rec_right_gain += factor;
+ if (left) global_settings.rec_left_gain +=
+ factor * sound_steps(SOUND_LEFT_GAIN);
+ if (right) global_settings.rec_right_gain +=
+ factor * sound_steps(SOUND_RIGHT_GAIN);
break;
#endif /* LINE, FMRADIO */
#if defined(HAVE_MIC_REC)
case AUDIO_SRC_MIC:
- global_settings.rec_mic_gain += factor;
+ global_settings.rec_mic_gain += factor * sound_steps(SOUND_MIC_GAIN);
#endif
}
}
@@ -494,7 +496,7 @@ static void auto_gain_control(int *peak_l, int *peak_r, int *balance)
(global_settings.rec_agc_cliptime + 1);
if (agc_left > AGC_HIGH) {
agc_droptime++;
- agc_risetime=0;
+ agc_risetime = 0;
if (agc_left > AGC_PEAK)
agc_droptime += 2;
}