From c70d9462be894f46abe868a618a2d72ccc8e4c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Thu, 20 Sep 2007 16:44:28 +0000 Subject: [PATCH] Make a few private functins static and use fewer bytes for constants git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14783 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/peakmeter.c | 11 +++++++---- apps/recorder/peakmeter.h | 5 +---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index ccf652a537..00591de657 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c @@ -131,6 +131,9 @@ static unsigned int peeks_per_redraw[PEEKS_PER_DRAW_SIZE]; static unsigned int ticks_per_redraw[TICKS_PER_DRAW_SIZE]; #endif +static void peak_meter_draw(struct screen *display, struct meter_scales *meter_scales, + int x, int y, int width, int height); + /* time out values for max */ static const short peak_time_out[] = { 0 * HZ, HZ / 5, 30, HZ / 2, HZ, 2 * HZ, @@ -149,7 +152,7 @@ static const long clip_time_out[] = { /* precalculated peak values that represent magical dBfs values. Used to draw the scale */ -static const int db_scale_src_values[DB_SCALE_SRC_VALUES_SIZE] = { +static const short db_scale_src_values[DB_SCALE_SRC_VALUES_SIZE] = { 32736, /* 0 db */ 22752, /* - 3 db */ 16640, /* - 6 db */ @@ -342,7 +345,7 @@ int peak_meter_db2sample(int db) * for dBfs: -9000 < newmin <= 0 * for linear: 0 <= newmin <= 100 */ -void peak_meter_set_min(int newmin) +static void peak_meter_set_min(int newmin) { if (pm_use_dbfs) { peak_meter_range_min = peak_meter_db2sample(newmin); @@ -392,7 +395,7 @@ int peak_meter_get_min(void) * for dBfs: -9000 < newmax <= 0 * for linear: 0 <= newmax <= 100 */ -void peak_meter_set_max(int newmax) +static void peak_meter_set_max(int newmax) { if (pm_use_dbfs) { peak_meter_range_max = peak_meter_db2sample(newmax); @@ -929,7 +932,7 @@ void peak_meter_screen(struct screen *display, int x, int y, int height) * width > 3 * @param int height - The height of the peak meter. height > 3 */ -void peak_meter_draw(struct screen *display, struct meter_scales *scales, +static void peak_meter_draw(struct screen *display, struct meter_scales *scales, int x, int y, int width, int height) { static int left_level = 0, right_level = 0; diff --git a/apps/recorder/peakmeter.h b/apps/recorder/peakmeter.h index be121b1aaf..9b8b24afcf 100644 --- a/apps/recorder/peakmeter.h +++ b/apps/recorder/peakmeter.h @@ -41,9 +41,7 @@ extern void peak_meter_init_times(int release, int hold, int clip_hold); #ifdef HAVE_AGC extern void peak_meter_get_peakhold(int *peak_left, int *peak_right); #endif -extern void peak_meter_set_min(int newmin); extern int peak_meter_get_min(void); -extern void peak_meter_set_max(int newmax); extern int peak_meter_get_max(void); extern void peak_meter_set_use_dbfs(bool use); extern bool peak_meter_get_use_dbfs(void); @@ -98,7 +96,6 @@ struct meter_scales{ long pm_peak_timeout_l; long pm_peak_timeout_r; }; -extern void peak_meter_draw(struct screen *display, struct meter_scales *meter_scales, - int x, int y, int width, int height); + extern void peak_meter_screen(struct screen *display, int x, int y, int height); #endif /* __PEAKMETER_H__ */