diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-11-06 23:12:11 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-11-06 23:12:11 +0000 |
commit | 8051a0b724bff718ce99acc0c45dd561d8d798d7 (patch) | |
tree | a09a44c1aeed92c313880671140c1f06c7a169e3 /firmware/mpeg.c | |
parent | 4d9be96a819206534594f79e856fbbd7880588d4 (diff) |
Sound settings rework: * Put all fixed parameters (unit, decimals, step, min, max, default, set function) for the individual settings into one structure array. * Use the new individual sound setting functions where appropriate. * Added dummy sound setting functions and defined the codec type for the sims. Fixes wrong sound settings ranges in the simulators. * Code cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7770 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 9d1aa3b9d6..3311fed43a 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -221,7 +221,7 @@ static int get_playable_space(void); static int get_unswapped_space(void); #endif /* !SIMULATOR */ -#if CONFIG_CODEC == MAS3587F +#if (CONFIG_CODEC == MAS3587F) && !defined(SIMULATOR) static void init_recording(void); static void prepend_header(void); static void update_header(void); @@ -231,7 +231,7 @@ static void stop_recording(void); static int get_unsaved_space(void); static void pause_recording(void); static void resume_recording(void); -#endif /* CONFIG_CODEC == MAS3587F */ +#endif /* (CONFIG_CODEC == MAS3587F) && !defined(SIMULATOR) */ #ifndef SIMULATOR @@ -2085,6 +2085,7 @@ bool audio_has_changed_track(void) } #if CONFIG_CODEC == MAS3587F +#ifndef SIMULATOR void audio_init_playback(void) { init_playback_done = false; @@ -2575,20 +2576,9 @@ unsigned long mpeg_num_recorded_bytes(void) return 0; } -#elif defined(SIMULATOR) - -/* dummies coming up +#else /* SIMULATOR */ -NOTE: when we implment these functions for real for software coded targets, -these dummies shall remain for the simulator */ - -void bitswap(unsigned char *data, int length) -{ - /* a dummy */ - /* this ought to be useless */ - (void)data; - (void)length; -} +/* dummies coming up */ void audio_init_playback(void) { @@ -2651,7 +2641,8 @@ void mpeg_set_recording_options(int frequency, int quality, (void)editable; (void)prerecord_time; } -#endif /* CONFIG_CODEC == MAS3587F; SIMULATOR */ +#endif /* SIMULATOR */ +#endif /* CONFIG_CODEC == MAS3587F */ void audio_play(int offset) { @@ -2807,7 +2798,7 @@ int audio_status(void) if(paused) ret |= AUDIO_STATUS_PAUSE; -#if CONFIG_CODEC == MAS3587F +#if (CONFIG_CODEC == MAS3587F) && !defined(SIMULATOR) if(is_recording && !is_prerecording) ret |= AUDIO_STATUS_RECORD; @@ -2867,7 +2858,7 @@ void audio_init(void) memset(trackdata, sizeof(trackdata), 0); -#if CONFIG_CODEC == MAS3587F +#if (CONFIG_CODEC == MAS3587F) && !defined(SIMULATOR) if(read_hw_mask() & PR_ACTIVE_HIGH) and_b(~0x08, &PADRH); else |