diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-07-12 12:06:38 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-07-13 00:08:51 -0400 |
commit | 023f6b6efd5407dc77c1253789f61baabb6607d6 (patch) | |
tree | 40d43117a7651715a2ce983eedff56b27962881a /apps/appevents.h | |
parent | ffa8626b0c93f8a65e0e17190917f7f173160842 (diff) | |
download | rockbox-023f6b6efd5407dc77c1253789f61baabb6607d6.tar.gz rockbox-023f6b6efd5407dc77c1253789f61baabb6607d6.zip |
Get rid of some superfluous single-purpose functions in playback.
* Remove explicit tracking of elapsed time of previous track.
* Remove function to obtain auto skip flag.
* Most playback events now carry the extra information instead and
pass 'struct track_event *' for data.
* Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes
it cleaner and removes the struct mp3entry.
Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
Diffstat (limited to 'apps/appevents.h')
-rw-r--r-- | apps/appevents.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/apps/appevents.h b/apps/appevents.h index 506f00329b..8677dbd522 100644 --- a/apps/appevents.h +++ b/apps/appevents.h | |||
@@ -31,21 +31,29 @@ | |||
31 | 31 | ||
32 | /** Playback events **/ | 32 | /** Playback events **/ |
33 | enum { | 33 | enum { |
34 | /* Playback is starting from a stopped state */ | 34 | /* Playback is starting from a stopped state |
35 | data = NULL */ | ||
35 | PLAYBACK_EVENT_START_PLAYBACK = (EVENT_CLASS_PLAYBACK|1), | 36 | PLAYBACK_EVENT_START_PLAYBACK = (EVENT_CLASS_PLAYBACK|1), |
36 | /* Audio has begun buffering for decoding track (or is already completed) */ | 37 | /* Audio has begun buffering for decoding track (or is already completed) |
38 | data = &(struct track_event){} */ | ||
37 | PLAYBACK_EVENT_TRACK_BUFFER, | 39 | PLAYBACK_EVENT_TRACK_BUFFER, |
38 | /* Handles for current user track are ready (other than audio or codec) */ | 40 | /* Handles for current user track are ready (other than audio or codec) |
41 | data = &(struct track_event){} */ | ||
39 | PLAYBACK_EVENT_CUR_TRACK_READY, | 42 | PLAYBACK_EVENT_CUR_TRACK_READY, |
40 | /* Current user track finished */ | 43 | /* Current user track finished |
44 | data = &(struct track_event){} */ | ||
41 | PLAYBACK_EVENT_TRACK_FINISH, | 45 | PLAYBACK_EVENT_TRACK_FINISH, |
42 | /* A new current user track has begun */ | 46 | /* A new current user track has begun |
47 | data = &(struct track_event){} */ | ||
43 | PLAYBACK_EVENT_TRACK_CHANGE, | 48 | PLAYBACK_EVENT_TRACK_CHANGE, |
44 | /* A manual skip is about to be processed */ | 49 | /* A manual skip is about to be processed |
50 | data = NULL */ | ||
45 | PLAYBACK_EVENT_TRACK_SKIP, | 51 | PLAYBACK_EVENT_TRACK_SKIP, |
46 | /* Next track medadata was just loaded */ | 52 | /* Next track medadata was just loaded |
53 | data = &(struct track_event){} */ | ||
47 | PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, | 54 | PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, |
48 | /* Voice is playing: data = &(bool){true|false} */ | 55 | /* Voice is playing |
56 | data = &(bool){true|false} */ | ||
49 | PLAYBACK_EVENT_VOICE_PLAYING, | 57 | PLAYBACK_EVENT_VOICE_PLAYING, |
50 | }; | 58 | }; |
51 | 59 | ||