summaryrefslogtreecommitdiffstats
path: root/apps/recorder
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-10-04 21:25:26 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-10-04 21:25:26 +0000
commit2e58d5935ddb19e0712d7a1c1b59db4665f724f5 (patch)
treec06aa481498649e4c599f3b8df393ec07a0d29f4 /apps/recorder
parent9bddc48b32f95f6279ffaa88a11c05db7534b1a1 (diff)
downloadrockbox-2e58d5935ddb19e0712d7a1c1b59db4665f724f5.tar.gz
rockbox-2e58d5935ddb19e0712d7a1c1b59db4665f724f5.tar.bz2
rockbox-2e58d5935ddb19e0712d7a1c1b59db4665f724f5.zip
Make function calc_db in peakmeter.c static
Remove some unneeded #include "peakmeter.h" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30713 a1c6a512-1295-4272-9138-f99709370657
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);