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



Rockbox mail archive

Subject: Re: For Comment and Trial: "Alternating WPS Lines" Proposed WPS extension
From: c s (rb_dev_at_yahoo.com)
Date: 2003-04-18


--- Kjell Ericson <Kjell.Ericson_at_haxx.se> wrote:
> I like your idea.
>
> > 1) The ';' character is used to separate items on
> > a line into sub-lines.
>
> Is it good to have a common character like that as a
> separator?

I chose ';' for several reasons including:
1) I think it's probably not very commonly used in wps
files now, but if needed, you can still put a ';'
character on your wps display by using: %;
2) It already has a similar use in many programming
languages where it is used as a line terminator.

> What happens if you have two %t in one statement
> "%t1text%t2text;%t3text"?

If there is more than one %t in a sub-line, the last
%t tag for each sub-line is the time that will be
used (unless multiple %t's are in one subline but in
separate branches of a conditional, in which case the
%t in the branch of the conditional that is taken will
be used) .

> My question is if the %t couldn't be a good
> separator itself?

That would break conditionals where you CAN have more
than one %t in one subline. For example:

%?ia<%t6%ia|%t2No ID3 Info>;...(remaining subline
definitions)

...will use one of 2 different times for one subline
depending on how the conditional evaluates.

> > 2) The "%t[0-9]" tag is used to specify a time 0-9
> (seconds) for the
> > sub-line to be displayed before the next sub-line
> is displayed. (example:
> > %t3)
>
> Will we be satisfied with only 0 to 9 seconds as a
> resolution? I think we
> gain more if we use millisecond resolution and from
> 0 to 99 instead.

I started with a single digit for the time because it
kept the parser logic simpler. Expanding it to two or
more digits is on my list of possible future
enhancements.

> Maybe "%t15" will make it delay 1.5 seconds?
> If you must have number after the %tx then you write
> "%t05" (for 0.5 seconds
> delay).

The base time that the %t multiplies can be any time
(within some limits) from a fraction of a second to
many seconds. It is currently hardcoded to be 1 second
but there is no reason it couldn't be a configuration
parameter.

> Having "%t" as a separator will also prevent the
> user from having a subline
> without a %t (and no need for default delay on those
> sublines).

There already is a default delay that will be used if
there is no %t. It is currently hardcoded to 2
seconds, but that also could be a configuration
parameter. The following is a valid sub-line
specification that will display 3 different sub-lines,
each for the default time period of 2 seconds:

%ia;%it;%id

> > Example wps sub-line specifications:
> > %s%t5%ia - %it;%t1%fb;%t2%pc %pr
>
> It can be a bit messy to read it...

I agree, but so are many complex wps specifications
even before my addition.

> Have you thought of a syntax like:
>
> %t5{%s%ia - %it} %t1{%fb} %t2{%pc %pr}
> I.e. the %t takes the content within the brackets
> and also eats any trailing
> space.

I agree, that format is much easier to read but it
would require more extensive and complex parser logic.
The current wps parser is by design very simple and
small, at the expense of requiring wps specification
syntax that sometimes looks somewhat cryptic and/or
difficult to read (even before my sub-line additions).
If I didn't have to worry about conditionals, your
suggestion above would be fairly simple to add to the
existing parser design.

> > I need someone to test it on a Recorder as I only
> have a Player for testing.
>
> Try it on the simulator first.

I have run it on the simulator, but I would like
reports from people running it on actual Recorder
units.

=====
Craig

rb_dev_at_yahoo.com

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com



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