summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-04-01 15:52:06 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-04-01 15:52:06 +0000
commit769f18be1d1a65aa521b91a9f7ba0f8baa0e0e4e (patch)
tree17d4e8d8604501650331d3ddbcfd08050b85ec7c
parentd884806a91f8a3d599210efa05d243a19a739e1c (diff)
downloadrockbox-769f18be1d1a65aa521b91a9f7ba0f8baa0e0e4e.zip
rockbox-769f18be1d1a65aa521b91a9f7ba0f8baa0e0e4e.tar.gz
rockbox-769f18be1d1a65aa521b91a9f7ba0f8baa0e0e4e.tar.bz2
rockbox-769f18be1d1a65aa521b91a9f7ba0f8baa0e0e4e.tar.xz
simulator stubs for iriver recording, iriver sims now have a recording screen (doesn't actually record!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9403 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/recorder/recording.c78
-rw-r--r--firmware/export/config-h100.h6
-rw-r--r--firmware/export/config-h120.h6
-rw-r--r--firmware/export/config-h300.h6
4 files changed, 86 insertions, 10 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 84fef9f..5fa0f39 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -1537,7 +1537,83 @@ void audio_beep(int duration)
/* dummy */
(void)duration;
}
-#endif
+
+#ifdef SIMULATOR
+/* stubs for recording sim */
+void audio_init_recording(void)
+{
+}
+
+void audio_close_recording(void)
+{
+}
+
+unsigned long audio_recorded_time(void)
+{
+ return 123;
+}
+
+unsigned long audio_num_recorded_bytes(void)
+{
+ return 5 * 1024 * 1024;
+}
+
+void audio_set_recording_options(int frequency, int quality,
+ int source, int channel_mode,
+ bool editable, int prerecord_time)
+{
+ frequency = frequency;
+ quality = quality;
+ source = source;
+ channel_mode = channel_mode;
+ editable = editable;
+ prerecord_time = prerecord_time;
+}
+
+void audio_set_recording_gain(int left, int right, int type)
+{
+ left = left;
+ right = right;
+ type = type;
+}
+
+void audio_stop_recording(void)
+{
+}
+
+void audio_pause_recording(void)
+{
+}
+
+void audio_resume_recording(void)
+{
+}
+
+void pcm_rec_get_peaks(int *left, int *right)
+{
+ if (left)
+ *left = 0;
+ if (right)
+ *right = 0;
+}
+
+void audio_record(const char *filename)
+{
+ filename = filename;
+}
+
+void audio_new_file(const char *filename)
+{
+ filename = filename;
+}
+
+unsigned long pcm_rec_status(void)
+{
+ return 0;
+}
+
+#endif /* #ifdef SIMULATOR */
+#endif /* #ifdef CONFIG_CODEC == SWCODEC */
#endif /* HAVE_RECORDING */
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 3185801..5042c54 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -62,6 +62,9 @@
#define HAVE_UDA1380
+/* define this if you have recording possibility */
+#define HAVE_RECORDING 1
+
#ifndef SIMULATOR
/* Define this if you have a Motorola SCF5249 */
@@ -78,9 +81,6 @@
#define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */
-/* define this if you have recording possibility */
-#define HAVE_RECORDING 1
-
/* Define this if the platform can charge batteries */
#define HAVE_CHARGING 1
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index a95698d..0c8eec0 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -58,6 +58,9 @@
#define HAVE_UDA1380
+/* define this if you have recording possibility */
+#define HAVE_RECORDING 1
+
#ifndef SIMULATOR
/* Define this if you have a Motorola SCF5249 */
@@ -70,9 +73,6 @@
#define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */
-/* define this if you have recording possibility */
-#define HAVE_RECORDING 1
-
/* Define if we have a hardware defect that causes ticking on the audio line */
#define HAVE_REMOTE_LCD_TICKING
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index 8a01203..f990166 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -58,6 +58,9 @@
#define HAVE_UDA1380
+/* define this if you have recording possibility */
+#define HAVE_RECORDING 1
+
#ifndef SIMULATOR
/* Define this if you have a Motorola SCF5249 */
@@ -71,9 +74,6 @@
#define BATTERY_SCALE_FACTOR 23437 /* FIX: this value is picked at random */
-/* define this if you have recording possibility */
-#define HAVE_RECORDING 1
-
/* Define this if the platform can charge batteries */
#define HAVE_CHARGING 1