dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: I need help with playing a loop

I need help with playing a loop

From: <>
Date: Sun, 21 Dec 2003 22:12:57 +0100

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)

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

        /* allow the mpeg_queue to empty */

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"?

Received on 2003-12-21

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy