Rockbox mail archive
Subject: Re: 1 standard generic callback system
Re: 1 standard generic callback system
On 06/06/07, Ray Lambert <codemonkey_at_interthingy.net> wrote:
> Jonathan Gordon wrote:
> > hey all,
> > so, in IRC we somehow got onto the problem that the filebrowser needs
> > to know when a track changes (so the follow playlist can work
> > properly), and scrobbler and database also need to know when this
> > happens.
> > playback.c has a few callbacks but only allows one function to be
> > registered for each, which causes a bit of a mess in playback.c (and
> > is one reason why scrobbler is broken on hwcodec.)
> > My attached patch addresses this issue, ...
> Just to add some fuel to the fire, I also implemented a callback interface
> when I wrote my A/B repeat feature. It's defined in
> firmware/export/audio.h and implemented in firmware/mpeg.c
> It uses a bitmask to subscribe to events (with a single callback per
> subscription) and a fixed-size array (sized by #define) to hold up to 10
> registered callbacks. It supports track position updates and end-of-track
So one callback can be triggered on multiple events? or each event can
only have one callback?
> (I've been meaning to port
> A/B repeat to the IAudio X5, which would mean updating it to work with SW
> codecs and custom WPSs, but I haven't been able to find the time.)
a/b mode doesnt work on the x5? I thought i worked on all swcodec as
long as a button has been setup for it?
Received on 2007-06-06
Page was last modified "Jan 10 2012" The Rockbox Crew