diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-21 23:01:12 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-21 23:01:12 +0000 |
| commit | 0ad617cbf0cc85dde241345194b76b590df567a8 (patch) | |
| tree | 65931c5a10788981b17f08bca1ba83151bee2855 /firmware/export | |
| parent | 658c8451ead9e7d07478c903c430af9c7799f324 (diff) | |
| download | rockbox-0ad617cbf0cc85dde241345194b76b590df567a8.zip rockbox-0ad617cbf0cc85dde241345194b76b590df567a8.tar.gz rockbox-0ad617cbf0cc85dde241345194b76b590df567a8.tar.bz2 rockbox-0ad617cbf0cc85dde241345194b76b590df567a8.tar.xz | |
Patch #1105616 by Ray Lambert - A-B Repeat for Archos studio/recorder, still not 100% complete, but I wanted to commit it before the 2.5 feature freeze
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7380 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
| -rw-r--r-- | firmware/export/audio.h | 40 | ||||
| -rw-r--r-- | firmware/export/config-fmrecorder.h | 2 | ||||
| -rw-r--r-- | firmware/export/config-player.h | 2 | ||||
| -rw-r--r-- | firmware/export/config-recorder.h | 2 | ||||
| -rw-r--r-- | firmware/export/config-recorderv2.h | 2 |
5 files changed, 48 insertions, 0 deletions
diff --git a/firmware/export/audio.h b/firmware/export/audio.h index 17de7f0..67ed052 100644 --- a/firmware/export/audio.h +++ b/firmware/export/audio.h @@ -79,4 +79,44 @@ int audio_get_file_pos(void); void audio_beep(int duration); void audio_init_playback(void); +/***********************************************************************/ +/* audio event handling */ + +/* subscribe to one or more audio event(s) by OR'ing together the desired */ +/* event IDs (defined below); a handler is called with a solitary event ID */ +/* (so switch() is okay) and possibly some useful data (depending on the */ +/* event); a handler must return one of the return codes defined below */ + +typedef int (*AUDIO_EVENT_HANDLER)(unsigned short event, unsigned long data); + +void audio_register_event_handler(AUDIO_EVENT_HANDLER handler, unsigned short mask); + +/***********************************************************************/ +/* handler return codes */ + +#define AUDIO_EVENT_RC_IGNORED 200 + /* indicates that no action was taken or the event was not recognized */ + +#define AUDIO_EVENT_RC_HANDLED 201 + /* indicates that the event was handled and some action was taken which renders + the original event invalid; USE WITH CARE!; this return code aborts all further + processing of the given event */ + +/***********************************************************************/ +/* audio event IDs */ + +#define AUDIO_EVENT_POS_REPORT (1<<0) + /* sends a periodic song position report to handlers; a report is sent on + each kernal tick; the number of ticks per second is defined by HZ; on each + report the current song position is passed in 'data'; if a handler takes an + action that changes the song or the song position it must return + AUDIO_EVENT_RC_HANDLED which suppresses the event for any remaining handlers */ + +#define AUDIO_EVENT_END_OF_TRACK (1<<1) + /* generated when the end of the currently playing track is reached; no + data is passed; if the handler implements some alternate end-of-track + processing it should return AUDIO_EVENT_RC_HANDLED which suppresses the + event for any remaining handlers as well as the normal end-of-track + processing */ + #endif diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 40ba404..c533889 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -24,6 +24,8 @@ /* Define this if you have an FM Radio */ #define CONFIG_TUNER S1A0903X01 +#define AB_REPEAT_ENABLE 1 + #ifndef SIMULATOR /* Define this if you have a MAS3587F */ diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 57fd7d8..70858a1 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h @@ -12,6 +12,8 @@ /* The number of bytes reserved for loadable plugins */ #define PLUGIN_BUFFER_SIZE 0x8000 +#define AB_REPEAT_ENABLE 1 + #ifndef SIMULATOR /* Define this if you have a SH7034 */ diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index bab6cd1..51cdb79 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h @@ -18,6 +18,8 @@ /* The number of bytes reserved for loadable plugins */ #define PLUGIN_BUFFER_SIZE 0x8000 +#define AB_REPEAT_ENABLE 1 + #ifndef SIMULATOR /* Define this if you have a MAS3587F */ diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 058495e..b2d6d01 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -21,6 +21,8 @@ /* The number of bytes reserved for loadable plugins */ #define PLUGIN_BUFFER_SIZE 0x8000 +#define AB_REPEAT_ENABLE 1 + #ifndef SIMULATOR /* Define this if you have a SH7034 */ |