summaryrefslogtreecommitdiffstats
path: root/apps/recorder/peakmeter.h
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 09:12:12 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 09:12:12 +0000
commit68482bbed286981a5ef09a466620e459790c96e6 (patch)
treede613ede8a83077b935debc1ec3edd965d5d6090 /apps/recorder/peakmeter.h
parent5fb6c64ffc8e6ab7512d805d2860831e492e5c52 (diff)
downloadrockbox-68482bbed286981a5ef09a466620e459790c96e6.tar.gz
rockbox-68482bbed286981a5ef09a466620e459790c96e6.zip
Patch #868645 by Philipp Pertermann, volume triggered recording for the Archos recording devices
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6243 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/peakmeter.h')
-rw-r--r--apps/recorder/peakmeter.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/apps/recorder/peakmeter.h b/apps/recorder/peakmeter.h
index db419a0afa..3c0a28bf3b 100644
--- a/apps/recorder/peakmeter.h
+++ b/apps/recorder/peakmeter.h
@@ -24,12 +24,12 @@
extern bool peak_meter_histogram(void);
#endif
-
extern bool peak_meter_enabled;
extern int peak_meter_fps;
extern void peak_meter_playback(bool playback);
extern void peak_meter_draw(int x, int y, int width, int height);
+extern int peak_meter_draw_get_btn(int x, int y, int width, int height);
extern void peak_meter_set_clip_hold(int time);
extern void peak_meter_peek(void);
extern void peak_meter_init_range( bool dbfs, int range_min, int range_max);
@@ -42,8 +42,40 @@ extern int peak_meter_get_max(void);
extern void peak_meter_set_use_dbfs(int use);
extern int 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);
+/* valid values for trigger_status */
+#define TRIG_OFF 0x00
+#define TRIG_READY 0x01
+#define TRIG_STEADY 0x02
+#define TRIG_GO 0x03
+#define TRIG_POSTREC 0x04
+#define TRIG_RETRIG 0x05
+#define TRIG_CONTINUE 0x06
+
+extern void peak_meter_define_trigger(
+ int start_threshold,
+ long start_duration,
+ long start_dropout,
+ int stop_threshold,
+ long stop_hold_time,
+ long restart_gap
+ );
+
+extern void peak_meter_trigger(bool on);
+extern int peak_meter_trigger_status(void);
+extern void peak_meter_set_trigger_listener(void (*listener)(int status));
+
+//#define TRIG_WIDTH 12
+//#define TRIG_HEIGHT 14
+
+#define TRIG_WIDTH 112
+#define TRIG_HEIGHT 8
+#define TRIGBAR_WIDTH (TRIG_WIDTH - (2 * (ICON_PLAY_STATE_WIDTH + 1)))
+
+extern void peak_meter_draw_trig(int x, int y);
+
extern unsigned short peak_meter_range_min;
extern unsigned short peak_meter_range_max;