From 65109732230849eeb9eec2f56f9e046ad6b476c3 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 23 Feb 2011 14:31:13 +0000 Subject: Give playback engine better control over the codec. Codec simply follows commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagtree.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'apps/tagtree.c') diff --git a/apps/tagtree.c b/apps/tagtree.c index ecc9f44d4d..575ab221ac 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -52,6 +52,7 @@ #include "appevents.h" #include "storage.h" #include "dir.h" +#include "playback.h" #define str_or_empty(x) (x ? x : "(NULL)") @@ -170,10 +171,6 @@ static int current_entry_count; static struct tree_context *tc; -#if CONFIG_CODEC == SWCODEC -extern bool automatic_skip; /* Who initiated in-progress skip? (C/A-) */ -#endif - static int get_token_str(char *buf, int size) { /* Find the start. */ @@ -726,7 +723,7 @@ static void tagtree_track_finish_event(void *data) first 15 seconds. */ if (id3->elapsed == 0 #if CONFIG_CODEC == SWCODEC /* HWCODEC doesn't have automatic_skip */ - || (id3->elapsed < 15 * 1000 && !automatic_skip) + || (id3->elapsed < 15 * 1000 && !audio_automatic_skip()) #endif ) { @@ -766,7 +763,7 @@ static void tagtree_track_finish_event(void *data) if (global_settings.autoresume_enable) { unsigned long offset - = automatic_skip ? 0 : id3->offset; + = audio_automatic_skip() ? 0 : id3->offset; tagcache_update_numeric(tagcache_idx, tag_lastoffset, offset); -- cgit