summaryrefslogtreecommitdiff
path: root/firmware/export/audio.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-07-12 12:06:38 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-07-13 00:08:51 -0400
commit023f6b6efd5407dc77c1253789f61baabb6607d6 (patch)
tree40d43117a7651715a2ce983eedff56b27962881a /firmware/export/audio.h
parentffa8626b0c93f8a65e0e17190917f7f173160842 (diff)
downloadrockbox-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 'firmware/export/audio.h')
-rw-r--r--firmware/export/audio.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/firmware/export/audio.h b/firmware/export/audio.h
index 24e8e9a0e7..8108f50939 100644
--- a/firmware/export/audio.h
+++ b/firmware/export/audio.h
@@ -236,12 +236,26 @@ int audio_get_spdif_sample_rate(void);
236void audio_spdif_set_monitor(int monitor_spdif); 236void audio_spdif_set_monitor(int monitor_spdif);
237#endif /* HAVE_SPDIF_IN */ 237#endif /* HAVE_SPDIF_IN */
238 238
239unsigned long audio_prev_elapsed(void);
240
241#if CONFIG_CODEC != SWCODEC
242/***********************************************************************/ 239/***********************************************************************/
243/* audio event handling */ 240/* audio event handling */
241enum track_event_flags
242{
243 TEF_NONE = 0x0, /* no flags are set */
244 TEF_CURRENT = 0x1, /* event is for the current track */
245#if CONFIG_CODEC == SWCODEC
246 TEF_AUTO_SKIP = 0x2, /* event is sent in context of auto skip */
247 TEF_REWIND = 0x4, /* interpret as rewind, id3->elapsed is the
248 position before the seek back to 0 */
249#endif /* CONFIG_CODEC == SWCODEC */
250};
244 251
252struct track_event
253{
254 unsigned int flags; /* combo of enum track_event_flags values */
255 struct mp3entry *id3; /* pointer to mp3entry describing track */
256};
257
258#if CONFIG_CODEC != SWCODEC
245/* subscribe to one or more audio event(s) by OR'ing together the desired */ 259/* subscribe to one or more audio event(s) by OR'ing together the desired */
246/* event IDs (defined below); a handler is called with a solitary event ID */ 260/* event IDs (defined below); a handler is called with a solitary event ID */
247/* (so switch() is okay) and possibly some useful data (depending on the */ 261/* (so switch() is okay) and possibly some useful data (depending on the */