summaryrefslogtreecommitdiffstats
path: root/apps/recorder
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/peakmeter.c12
-rw-r--r--apps/recorder/peakmeter.h1
2 files changed, 6 insertions, 7 deletions
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index fd8f8d9fbe..c7f2b17d05 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -227,7 +227,7 @@ static int db_scale_count = DB_SCALE_SRC_VALUES_SIZE;
* range of -12dB to 0dB (78.0 to 90.0dB).
*/
-int calc_db (int isample)
+static int calc_db (int isample)
{
/* return n+m*(isample-istart)/100 */
int n;
@@ -243,13 +243,13 @@ int calc_db (int isample)
if (isample < 5) {
istart = 1; /* Range 1 */
n = 98;
- m = 34950;
- }
- else {
+ m = 34950;
+ }
+ else {
istart = 5; /* Range 2 */
n = 1496;
- m = 7168;
- }
+ m = 7168;
+ }
}
else {
istart = 24; /* Range 3 */
diff --git a/apps/recorder/peakmeter.h b/apps/recorder/peakmeter.h
index 6be43a5f3a..267ca20442 100644
--- a/apps/recorder/peakmeter.h
+++ b/apps/recorder/peakmeter.h
@@ -52,7 +52,6 @@ extern int peak_meter_get_min(void);
extern int peak_meter_get_max(void);
extern void peak_meter_set_use_dbfs(bool use);
extern bool peak_meter_get_use_dbfs(void);
-extern int calc_db (int isample);
extern int peak_meter_db2sample(int db);
extern unsigned short peak_meter_scale_value(unsigned short val, int meterwidth);