From 769f18be1d1a65aa521b91a9f7ba0f8baa0e0e4e Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Sat, 1 Apr 2006 15:52:06 +0000 Subject: 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 --- apps/recorder/recording.c | 78 ++++++++++++++++++++++++++++++++++++++++++- firmware/export/config-h100.h | 6 ++-- firmware/export/config-h120.h | 6 ++-- firmware/export/config-h300.h | 6 ++-- 4 files changed, 86 insertions(+), 10 deletions(-) diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 84fef9f3a1..5fa0f398fe 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 3185801078..5042c5407e 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 a95698de69..0c8eec031e 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 8a01203b87..f9901666e5 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 -- cgit v1.2.3