diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-12-25 14:01:47 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-12-25 14:01:47 +0000 |
commit | 2597a1349772fe505d27cb94392eb4d8a3c3b35d (patch) | |
tree | 185a4809430f9dded488bb1b058d3f97345058a3 /apps/recorder/recording.c | |
parent | 37aeb12cc99cc22f62c44d5b0adcae35d0c471d8 (diff) | |
download | rockbox-2597a1349772fe505d27cb94392eb4d8a3c3b35d.tar.gz rockbox-2597a1349772fe505d27cb94392eb4d8a3c3b35d.zip |
Next round of static'ing and related fixes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11836 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r-- | apps/recorder/recording.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index fa97837fd5..266a035632 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -73,14 +73,14 @@ | |||
73 | #define PM_HEIGHT ((LCD_HEIGHT >= 72) ? 2 : 1) | 73 | #define PM_HEIGHT ((LCD_HEIGHT >= 72) ? 2 : 1) |
74 | 74 | ||
75 | #if CONFIG_KEYPAD == RECORDER_PAD | 75 | #if CONFIG_KEYPAD == RECORDER_PAD |
76 | bool f2_rec_screen(void); | 76 | static bool f2_rec_screen(void); |
77 | bool f3_rec_screen(void); | 77 | static bool f3_rec_screen(void); |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #define MAX_FILE_SIZE 0x7F800000 /* 2 GB - 4 MB */ | 80 | #define MAX_FILE_SIZE 0x7F800000 /* 2 GB - 4 MB */ |
81 | 81 | ||
82 | int screen_update = NB_SCREENS; | 82 | static int screen_update = NB_SCREENS; |
83 | bool remote_display_on = true; | 83 | static bool remote_display_on = true; |
84 | 84 | ||
85 | /** File name creation **/ | 85 | /** File name creation **/ |
86 | #if CONFIG_CODEC == SWCODEC | 86 | #if CONFIG_CODEC == SWCODEC |
@@ -124,7 +124,7 @@ static short balance_mem[BAL_MEM_SIZE]; | |||
124 | #define AGC_MODE_SIZE 5 | 124 | #define AGC_MODE_SIZE 5 |
125 | #define AGC_SAFETY_MODE 0 | 125 | #define AGC_SAFETY_MODE 0 |
126 | 126 | ||
127 | static char* agc_preset_str[] = | 127 | static const char* agc_preset_str[] = |
128 | { "Off", "S", "L", "D", "M", "V" }; | 128 | { "Off", "S", "L", "D", "M", "V" }; |
129 | /* "Off", | 129 | /* "Off", |
130 | "Safety (clip)", | 130 | "Safety (clip)", |
@@ -137,17 +137,17 @@ static char* agc_preset_str[] = | |||
137 | #define AGC_HIGH 27254 /* accelerated gain reduction threshold -1.6dB */ | 137 | #define AGC_HIGH 27254 /* accelerated gain reduction threshold -1.6dB */ |
138 | #define AGC_IMG 823 /* threshold for balance control -32dB */ | 138 | #define AGC_IMG 823 /* threshold for balance control -32dB */ |
139 | /* autogain high level thresholds (-3dB, -7dB, -4dB, -5dB, -5dB) */ | 139 | /* autogain high level thresholds (-3dB, -7dB, -4dB, -5dB, -5dB) */ |
140 | const short agc_th_hi[AGC_MODE_SIZE] = | 140 | static const short agc_th_hi[AGC_MODE_SIZE] = |
141 | { 23197, 14637, 21156, 18428, 18426 }; | 141 | { 23197, 14637, 21156, 18428, 18426 }; |
142 | /* autogain low level thresholds (-14dB, -11dB, -6dB, -7dB, -8dB) */ | 142 | /* autogain low level thresholds (-14dB, -11dB, -6dB, -7dB, -8dB) */ |
143 | const short agc_th_lo[AGC_MODE_SIZE] = | 143 | static const short agc_th_lo[AGC_MODE_SIZE] = |
144 | { 6538, 9235, 16422, 14636, 13045 }; | 144 | { 6538, 9235, 16422, 14636, 13045 }; |
145 | /* autogain threshold times [1/5s] or [200ms] */ | 145 | /* autogain threshold times [1/5s] or [200ms] */ |
146 | const short agc_tdrop[AGC_MODE_SIZE] = | 146 | static const short agc_tdrop[AGC_MODE_SIZE] = |
147 | { 900, 225, 150, 60, 8 }; | 147 | { 900, 225, 150, 60, 8 }; |
148 | const short agc_trise[AGC_MODE_SIZE] = | 148 | static const short agc_trise[AGC_MODE_SIZE] = |
149 | { 9000, 750, 400, 150, 20 }; | 149 | { 9000, 750, 400, 150, 20 }; |
150 | const short agc_tbal[AGC_MODE_SIZE] = | 150 | static const short agc_tbal[AGC_MODE_SIZE] = |
151 | { 4500, 500, 300, 100, 15 }; | 151 | { 4500, 500, 300, 100, 15 }; |
152 | /* AGC operation */ | 152 | /* AGC operation */ |
153 | static bool agc_enable = true; | 153 | static bool agc_enable = true; |
@@ -186,7 +186,7 @@ static void set_gain(void) | |||
186 | * Returns validity of peak values. | 186 | * Returns validity of peak values. |
187 | * Used for automatic gain control and history diagram. | 187 | * Used for automatic gain control and history diagram. |
188 | */ | 188 | */ |
189 | bool read_peak_levels(int *peak_l, int *peak_r, int *balance) | 189 | static bool read_peak_levels(int *peak_l, int *peak_r, int *balance) |
190 | { | 190 | { |
191 | peak_meter_get_peakhold(peak_l, peak_r); | 191 | peak_meter_get_peakhold(peak_l, peak_r); |
192 | peak_valid_mem[peak_time % 3] = *peak_l; | 192 | peak_valid_mem[peak_time % 3] = *peak_l; |
@@ -215,7 +215,7 @@ bool read_peak_levels(int *peak_l, int *peak_r, int *balance) | |||
215 | } | 215 | } |
216 | 216 | ||
217 | /* AGC helper function to check if maximum gain is reached */ | 217 | /* AGC helper function to check if maximum gain is reached */ |
218 | bool agc_gain_is_max(bool left, bool right) | 218 | static bool agc_gain_is_max(bool left, bool right) |
219 | { | 219 | { |
220 | /* range -128...+108 [0.5dB] */ | 220 | /* range -128...+108 [0.5dB] */ |
221 | short gain_current_l; | 221 | short gain_current_l; |
@@ -242,7 +242,7 @@ bool agc_gain_is_max(bool left, bool right) | |||
242 | (right && (gain_current_r >= agc_maxgain))); | 242 | (right && (gain_current_r >= agc_maxgain))); |
243 | } | 243 | } |
244 | 244 | ||
245 | void change_recording_gain(bool increment, bool left, bool right) | 245 | static void change_recording_gain(bool increment, bool left, bool right) |
246 | { | 246 | { |
247 | int factor = (increment ? 1 : -1); | 247 | int factor = (increment ? 1 : -1); |
248 | 248 | ||
@@ -265,7 +265,7 @@ void change_recording_gain(bool increment, bool left, bool right) | |||
265 | * Change recording gain if peak_x levels are above or below | 265 | * Change recording gain if peak_x levels are above or below |
266 | * target volume for specified timeouts. | 266 | * target volume for specified timeouts. |
267 | */ | 267 | */ |
268 | void auto_gain_control(int *peak_l, int *peak_r, int *balance) | 268 | static void auto_gain_control(int *peak_l, int *peak_r, int *balance) |
269 | { | 269 | { |
270 | int agc_mono; | 270 | int agc_mono; |
271 | short agc_mode; | 271 | short agc_mode; |
@@ -421,7 +421,7 @@ static const char* const fmtstr[] = | |||
421 | "%c%d.%02d %s " /* 2 decimals */ | 421 | "%c%d.%02d %s " /* 2 decimals */ |
422 | }; | 422 | }; |
423 | 423 | ||
424 | char *fmt_gain(int snd, int val, char *str, int len) | 424 | static char *fmt_gain(int snd, int val, char *str, int len) |
425 | { | 425 | { |
426 | int i, d, numdec; | 426 | int i, d, numdec; |
427 | const char *unit; | 427 | const char *unit; |
@@ -450,7 +450,7 @@ char *fmt_gain(int snd, int val, char *str, int len) | |||
450 | 450 | ||
451 | static int cursor; | 451 | static int cursor; |
452 | 452 | ||
453 | void adjust_cursor(void) | 453 | static void adjust_cursor(void) |
454 | { | 454 | { |
455 | int max_cursor; | 455 | int max_cursor; |
456 | 456 | ||
@@ -1776,7 +1776,7 @@ bool recording_screen(bool no_source) | |||
1776 | } /* recording_screen */ | 1776 | } /* recording_screen */ |
1777 | 1777 | ||
1778 | #if CONFIG_KEYPAD == RECORDER_PAD | 1778 | #if CONFIG_KEYPAD == RECORDER_PAD |
1779 | bool f2_rec_screen(void) | 1779 | static bool f2_rec_screen(void) |
1780 | { | 1780 | { |
1781 | static const char* const freq_str[6] = | 1781 | static const char* const freq_str[6] = |
1782 | { | 1782 | { |
@@ -1916,7 +1916,7 @@ bool f2_rec_screen(void) | |||
1916 | return false; | 1916 | return false; |
1917 | } | 1917 | } |
1918 | 1918 | ||
1919 | bool f3_rec_screen(void) | 1919 | static bool f3_rec_screen(void) |
1920 | { | 1920 | { |
1921 | bool exit = false; | 1921 | bool exit = false; |
1922 | bool used = false; | 1922 | bool used = false; |