Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: I need help with playing a loop
From: phil_at_carangg.de
Date: 2003-12-21


Principially I try to play a loop like this:

struct plugin_api* rb = api; /* api is given from outside */ struct
mp3entry* mp3 = rb->mpeg_current_track(); unsigned int loop_start = 500;
/* just a dummy value as example */ unsigned int loop_end = 100000 /*
just a dummy value as example */

while (rb->button_get(false) == BUTTON_NONE)
{
  if (mp3->elapsed >= loop_end)
  {
        rb->mpeg_ff_rewind(loop_start);

        /* this code didn't help either */
      /* rb->mpeg_flush_and_reload_tracks();*/

        /* allow the mpeg_queue to empty */
      rb->yield();
  }
}

This works pretty fine unless the loop loops over a point where the mpeg
engine has to reload. Then there are dropouts (which doesn't surprise
me) or plays inexpected parts of the buffer. Is there a way to tell the
mpeg thingie "drop all your data and reload from here"?

Phil



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa