diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-03-17 05:22:53 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-03-17 05:22:53 +0000 |
commit | a67e5d89efe6c3fcf5a2eaf27aac1c14f024ee27 (patch) | |
tree | 2e62c72ea2e45410216bdbd62b70101db0f4e7ca /apps | |
parent | c6b6bad18fcd68182574086c2eb2a1da30d36d25 (diff) | |
download | rockbox-a67e5d89efe6c3fcf5a2eaf27aac1c14f024ee27.tar.gz rockbox-a67e5d89efe6c3fcf5a2eaf27aac1c14f024ee27.zip |
It makes more sense for the callback registrar to decide if its a "oneshot" then the callback caller.
(Doing it this way means playback could(/should?) registar a disk spinup callback at init which is called every spinup without needing to be reregistered)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16685 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 6 | ||||
-rw-r--r-- | apps/scrobbler.c | 2 | ||||
-rw-r--r-- | apps/tagtree.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/playback.c b/apps/playback.c index ee1787e612..7eecd23e35 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -1731,7 +1731,7 @@ static bool audio_load_track(int offset, bool start_play) | |||
1731 | { | 1731 | { |
1732 | if (get_metadata(&id3, fd, trackname)) | 1732 | if (get_metadata(&id3, fd, trackname)) |
1733 | { | 1733 | { |
1734 | send_event(PLAYBACK_EVENT_TRACK_BUFFER, false, &id3); | 1734 | send_event(PLAYBACK_EVENT_TRACK_BUFFER, &id3); |
1735 | 1735 | ||
1736 | tracks[track_widx].id3_hid = | 1736 | tracks[track_widx].id3_hid = |
1737 | bufalloc(&id3, sizeof(struct mp3entry), TYPE_ID3); | 1737 | bufalloc(&id3, sizeof(struct mp3entry), TYPE_ID3); |
@@ -1968,7 +1968,7 @@ static int audio_check_new_track(void) | |||
1968 | bool end_of_playlist; /* Temporary flag, not the same as playlist_end */ | 1968 | bool end_of_playlist; /* Temporary flag, not the same as playlist_end */ |
1969 | 1969 | ||
1970 | /* Now it's good time to send track unbuffer events. */ | 1970 | /* Now it's good time to send track unbuffer events. */ |
1971 | send_event(PLAYBACK_EVENT_TRACK_FINISH, false, &curtrack_id3); | 1971 | send_event(PLAYBACK_EVENT_TRACK_FINISH, &curtrack_id3); |
1972 | 1972 | ||
1973 | if (dir_skip) | 1973 | if (dir_skip) |
1974 | { | 1974 | { |
@@ -2339,7 +2339,7 @@ static void audio_finalise_track_change(void) | |||
2339 | bufgetid3(prev_ti->id3_hid)->elapsed = 0; | 2339 | bufgetid3(prev_ti->id3_hid)->elapsed = 0; |
2340 | } | 2340 | } |
2341 | 2341 | ||
2342 | send_event(PLAYBACK_EVENT_TRACK_CHANGE, false, &curtrack_id3); | 2342 | send_event(PLAYBACK_EVENT_TRACK_CHANGE, &curtrack_id3); |
2343 | 2343 | ||
2344 | track_changed = true; | 2344 | track_changed = true; |
2345 | playlist_update_resume_info(audio_current_track()); | 2345 | playlist_update_resume_info(audio_current_track()); |
diff --git a/apps/scrobbler.c b/apps/scrobbler.c index 2f60e858e1..85285cb911 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c | |||
@@ -227,7 +227,7 @@ int scrobbler_init(void) | |||
227 | 227 | ||
228 | scrobbler_cache = buffer_alloc(SCROBBLER_MAX_CACHE*SCROBBLER_CACHE_LEN); | 228 | scrobbler_cache = buffer_alloc(SCROBBLER_MAX_CACHE*SCROBBLER_CACHE_LEN); |
229 | 229 | ||
230 | add_event(PLAYBACK_EVENT_TRACK_CHANGE, scrobbler_change_event); | 230 | add_event(PLAYBACK_EVENT_TRACK_CHANGE, false, scrobbler_change_event); |
231 | cache_pos = 0; | 231 | cache_pos = 0; |
232 | pending = false; | 232 | pending = false; |
233 | scrobbler_initialised = true; | 233 | scrobbler_initialised = true; |
diff --git a/apps/tagtree.c b/apps/tagtree.c index 4572204ae5..faffb0053d 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -925,8 +925,8 @@ void tagtree_init(void) | |||
925 | 925 | ||
926 | uniqbuf = buffer_alloc(UNIQBUF_SIZE); | 926 | uniqbuf = buffer_alloc(UNIQBUF_SIZE); |
927 | 927 | ||
928 | add_event(PLAYBACK_EVENT_TRACK_BUFFER, tagtree_buffer_event); | 928 | add_event(PLAYBACK_EVENT_TRACK_BUFFER, false, tagtree_buffer_event); |
929 | add_event(PLAYBACK_EVENT_TRACK_FINISH, tagtree_track_finish_event); | 929 | add_event(PLAYBACK_EVENT_TRACK_FINISH, false, tagtree_track_finish_event); |
930 | } | 930 | } |
931 | 931 | ||
932 | static bool show_search_progress(bool init, int count) | 932 | static bool show_search_progress(bool init, int count) |