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



Rockbox mail archive

Subject: A-B Repeat patch updated (comments requested on changes)

A-B Repeat patch updated (comments requested on changes)

From: Ray Lambert <listlizard_at_interthingy.net>
Date: Sun, 22 May 2005 16:52:35 +0000

Hi,

I've just updated my patch for A-B Repeat (#1105616). I updated it for
daily build 5/21 and I've also made two changes, one to the key bindings
and another to the SW architecture. I'd like to request your comments
on these changes. The details follow:

First the key binding. Some background to start with: the A-B Repeat
feature allows the user to define two marks (called A and B) and
playback then loops between those two marks. Since I wanted to be able
to set and reset the marks at any time while playing, I needed to avoid
a modal interface. This required me to allocate some valuable key
bindings from the WPS. I chose (working on an FM Recorder) ON+PREV to
set the A mark, ON+NEXT to set the B mark, and ON+OFF to clear both
marks. These are working out very well for me, except for one thing:
the pitch screen. As you're all probably aware, the pitch screen is
invoked by holding down the ON key until it starts repeating. When
using A-B Repeat, I find that I usually want to press the ON key in
advance of setting the mark, in anticipation of playback reaching the
point I want to mark. But the pitch screen often pops up and messes me
up (I end-up having to rewind and start over; very annoying). So I
decided to do something about this, and it's my solution that I'd like
feedback on. I decided to change the way the pitch screen get invoked:
you must now press ON+UP or ON+DOWN (this first key press will not
change the pitch). Simply holding ON no longer brings up the pitch
screen; in fact, it doesn't do anything by itself anymore. I think this
works much better but I'm not sure what kind of consensus existed for
the former behavior. So I'd like to hear comments on this.

Second, I changed a portion of the SW architecture relating to
interaction between the firmware and apps directories. In order to get
reasonably accurate results, I needed to implement some portions of the
A-B Repeat functionality in firmware/mpeg.c. Since the main A-B Repeat
module lives in apps, this required mpeg.c to make some calls to apps by
extern'ing the functions, which, of course, is pretty ugly. I decided
on and implemented a better solution for this in this update, which
essentially adds a new public facility to mpeg/audio. It's this that
I'd comments on. What I did, essentially, was create an API that allows
non-firmware code to subscribe to notifications of audio events. I
initially defined two events that I needed for A-B Repeat (song position
update and end of track). mpeg.c dispatches notifications (via
callbacks) at the appropriate times and the handler has the opportunity
to override the normal functionality (if any) that would be executed by
mpeg.c. The result is that mpeg doesn't need to know anything specific
about who is using these events (e.g. A-B Repeat) and no unwanted
dependencies are created. Such a facility can be perceived as a fairly
major architectural change however, so I'd like to know if there are any
objections to it.

Lastly, I've got a question about the build environment. I found that I
had to run make in the tools directory before I could build rockbox. I
don't recall having to do that last time (back in January, I think). Is
this a new step or is something broken? (I'm guessing it's intentional
and related to the recent work for other devices.) If so, someone
should add it to the docs. Note also, BTW, that "generate_rocklatin"
fails trying to find autoconf.h when building in tools. (I ignored it
because I didn't need it; this caused "searchengine" to fail later, but
I don't need that either; everything I did need built.)

Thanks,

~ray

-- 
#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b
 "The music business is a cruel and shallow money trench, a long
 plastic hallway where thieves and pimps run free, and good men
 die like dogs ....... There's also a negative side."
   -- Hunter S. Thompson
#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b#b
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on 2005-05-22

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