summaryrefslogtreecommitdiffstats
path: root/apps/tagtree.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-02-23 14:31:13 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-02-23 14:31:13 +0000
commit65109732230849eeb9eec2f56f9e046ad6b476c3 (patch)
tree51096b18d823cfb05575335b91e3d1eb75ca4e27 /apps/tagtree.c
parent43b38b71f5944c1a29060847b58d7e79f7dfe428 (diff)
downloadrockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.tar.gz
rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.tar.bz2
rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.zip
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
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c9
1 files changed, 3 insertions, 6 deletions
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);