diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2008-03-16 13:55:16 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2008-03-16 13:55:16 +0000 |
commit | 19c6e66c1353993659ee007a6c1792a6b0b7ba13 (patch) | |
tree | 1dd7f88282b2e543fb5b22458fcb2f3bf1c7eb80 /apps/playback.h | |
parent | 478ba0afa11061a620e44cd9cc60debd955b1b33 (diff) | |
download | rockbox-19c6e66c1353993659ee007a6c1792a6b0b7ba13.tar.gz rockbox-19c6e66c1353993659ee007a6c1792a6b0b7ba13.zip |
Implement the playback event handling as a system-wide multi-purpose event system. Unified mpeg.c and playback.c audio event handling. Converted ata_idle_notify to use the new event handling system also.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16682 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.h')
-rw-r--r-- | apps/playback.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/apps/playback.h b/apps/playback.h index 14ba35cea4..0b78eb3bcb 100644 --- a/apps/playback.h +++ b/apps/playback.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include "id3.h" | 25 | #include "id3.h" |
26 | #include "mp3data.h" | 26 | #include "mp3data.h" |
27 | #include "events.h" | ||
27 | 28 | ||
28 | #define CODEC_IDX_AUDIO 0 | 29 | #define CODEC_IDX_AUDIO 0 |
29 | #define CODEC_IDX_VOICE 1 | 30 | #define CODEC_IDX_VOICE 1 |
@@ -39,13 +40,6 @@ | |||
39 | 40 | ||
40 | #define MAX_TRACK_MASK (MAX_TRACK-1) | 41 | #define MAX_TRACK_MASK (MAX_TRACK-1) |
41 | 42 | ||
42 | #define PLAYBACK_MAX_EVENTS 4 | ||
43 | enum PLAYBACK_EVENT_TYPE { | ||
44 | PLAYBACK_EVENT_TRACK_BUFFER, | ||
45 | PLAYBACK_EVENT_TRACK_FINISH, | ||
46 | PLAYBACK_EVENT_TRACK_CHANGE, | ||
47 | }; | ||
48 | |||
49 | /* Functions */ | 43 | /* Functions */ |
50 | const char * get_codec_filename(int cod_spec); | 44 | const char * get_codec_filename(int cod_spec); |
51 | void voice_wait(void); | 45 | void voice_wait(void); |
@@ -53,13 +47,7 @@ void voice_wait(void); | |||
53 | #if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/gwps.c */ | 47 | #if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/gwps.c */ |
54 | extern void audio_next_dir(void); | 48 | extern void audio_next_dir(void); |
55 | extern void audio_prev_dir(void); | 49 | extern void audio_prev_dir(void); |
56 | void playback_add_event(enum PLAYBACK_EVENT_TYPE type, void (*handler)); | ||
57 | void playback_remove_event(enum PLAYBACK_EVENT_TYPE type, void (*handler)); | ||
58 | #else | 50 | #else |
59 | /* Really, should get rid of these HWCODEC api definitions here. */ | ||
60 | void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3)); | ||
61 | void audio_set_track_buffer_event(void (*handler)(struct mp3entry *id3)); | ||
62 | void audio_set_track_unbuffer_event(void (*handler)(struct mp3entry *id3)); | ||
63 | # define audio_next_dir() | 51 | # define audio_next_dir() |
64 | #define audio_prev_dir() | 52 | #define audio_prev_dir() |
65 | #endif | 53 | #endif |