%LT(offset, nowrap) - get the text for the "being drawn"+offset item (offset being + or -). if the second param is "nowrap" (Without quotes) the text will be blank if the item would need to wrap. Same for the icon
e.g:
%LT(-1)
%LT <<
%LT(1, nowrap)
will display:
Four
Five <<
Six (or nothing if Five is the last item)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30502 a1c6a512-1295-4272-9138-f99709370657
%ss(start, length, tag) - i.e %ss(0,1,%TL) will get the first letter of the current lines text.
use - for the length to get the rest of the tag (e.g %ss(1,-,%TL) will get everything after the first letter).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30500 a1c6a512-1295-4272-9138-f99709370657
The usefulness of this is arguable, but this improves consistency at only a very small cost
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30491 a1c6a512-1295-4272-9138-f99709370657
This option allows accessing the card slot from "dumb" USB hosts like some car
audio systems that do not handle multi-LUN devices.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30489 a1c6a512-1295-4272-9138-f99709370657
Reuse playback's Q_AUDIO_REMAKE_AUDIO_BUFFER capabilities to set the new
playback buffer, instead of stopping/restarting manual. This strongly
reduces the visibility of the short audio stop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30480 a1c6a512-1295-4272-9138-f99709370657
* Enhance allocation function comments to better state the return value and what an invalid value is
* Change clients to check for "< 0" instead of "<= 0" or "== 0"
* Return -1 or -2 depending on the exact failure in buflib_alloc_ex.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30469 a1c6a512-1295-4272-9138-f99709370657
due to lack of user feedback the actual tags may change, hopefully not though.
The way it works is the skin specifies a rectangle and a viewport label. For each item in the list that is being displayed all viewports with the specified label are drawn. However, instead of the viewport x/y position being offset from the top left corner like normal they are offset from the rectangle position in the list (so think of them as child-viewports of the rectangle which moves).
Normally the rectangle will move down the screen to show a normal list, this can be changed to move across the screen in a grid pattern.
The UI viewport is used to bound the items (i.e %Vi() )
Scrolling is completly disabled in all items except the currently selected item.
This works well in combination with the %cs tag to show differently styled lists based on the current screen :)
New tags:
%LT - Get the current items text
%LI - Get the current items icon number
%Lc - Use as a conditional to determine if the current item is the selected item
%LB - BAR TAG to show the scroll bar, params/options like other bar types. It still needs a bit of work though. Use as a conditional to find out if the bar is actually needed
%Lb(viewport, width, height [,tile]) - specify the viewport label to draw for each item and the size of each item. if the last param is 'tile' it will form a grid instead of a list
example.sbs:
%?cs<%Lb(a,100,20)|>
%V(0,0,10,-,1)%Vf(aabbcc)
%?LB<%LB(0,0,10,185, invert)>
%Vi(-,10,0,-,-35,1)
%Vl(a,5,5,160,12,1)
%s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz %LT zzzzz%s%?Lc<%ar%<%<%<>
%V(0,185,-,-,1)
%s%LT
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30461 a1c6a512-1295-4272-9138-f99709370657
Also add two dircache function, one of which does what dircache_disable()
did previously as this now also frees the dircache buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30393 a1c6a512-1295-4272-9138-f99709370657
buflib_get_data() isn't inlined for plugins anymore, but can be if really needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30387 a1c6a512-1295-4272-9138-f99709370657
This enables the ability to allocate (and free) memory dynamically
without fragmentation, through compaction. This means allocations can move
and fragmentation be reduced. Most changes are preparing Rockbox for this,
which many times means adding a move callback which can temporarily disable
movement when the corresponding code is in a critical section.
For now, the audio buffer allocation has a central role, because it's the one
having allocated most. This buffer is able to shrink itself, for which it
needs to stop playback for a very short moment. For this,
audio_buffer_available() returns the size of the audio buffer which can
possibly be used by other allocations because the audio buffer can shrink.
lastfm scrobbling and timestretch can now be toggled at runtime without
requiring a reboot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
The buflib memory allocator is handle based and can free and
compact, move or resize memory on demand. This allows to effeciently
allocate memory dynamically without an MMU, by avoiding fragmentation
through memory compaction.
This patch adds the buflib library to the core, along with
convinience wrappers to omit the context parameter. Compaction is
not yet enabled, but will be in a later patch. Therefore, this acts as a
replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug
menu.
See buflib.h for some API documentation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
buffer chunks.
* Samples and position indication is closely associated with audio data
instead of compensating by a latency constant. Alleviates problems with
using the elapsed as a track indicator where it could be off by several
steps.
* Timing is accurate throughout track even if resampling for pitch shift,
whereas before it updated during transition latency at the normal 1:1 rate.
* Simpler PCM buffer with a constant chunk size, no linked lists.
In converting crossfade, a minor change was made to not change the WPS until
the fade-in of the incoming track, whereas before it would change upon the
start of the fade-out of the outgoing track possibly having the WPS change
with far too much lead time.
Codec changes are to set elapsed times *before* writing next PCM frame because
time and position data last set are saved in the next committed PCM chunk.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30366 a1c6a512-1295-4272-9138-f99709370657
get_long_be shifts an unsigned char left--which results in a signed int.
It then implicitly casts to unsigned long, which sign-extends the int,
leaving unwanted 1's in the upper bits. This affects AIFF.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30364 a1c6a512-1295-4272-9138-f99709370657
I'm wondering if that also was the cause
for the lines exactly next to it:
---------------------------------
/* This cleans out the mysterious garbage that appears */
rb->lcd_clear_display();
---------------------------------
-> Atleast I see no garbage in the sim.
Credit for this bug goes to "cppcheck".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30345 a1c6a512-1295-4272-9138-f99709370657
The data abort was in find_handle() because current_handle was corrupted. This
most probably happened due to the FMS allocating Radio AA on the buffer without
resetting the buffer, corrupting buffering/playback state.
The fix is to grab buffer control explicitely.
r30308 isn't actually related, regardless of the task title.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30342 a1c6a512-1295-4272-9138-f99709370657
Do it the hwcodec way which doesn't need a buffer_alloc(). The buffer for the
.talk files is now allocated together with the voicefile buffer.
Should also fix a panic when the .talk file buffer was allocated late at runtime.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30335 a1c6a512-1295-4272-9138-f99709370657
Centralize the selection of codec compilation flags to codec.make
to avoid having to duplicate the per cpu selection logic and the
build rule in the individual codec lib make files and make tweaking
easier.
The two special cases, libmad and libspeex were left alone.
I plan to introduce a var for arm generation so that appropriate flags
can be selected per generation as benchmarking results have shown that
different arm arches might have different optimal flags.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30330 a1c6a512-1295-4272-9138-f99709370657
Previously the scrobbler was shutdown, probably to force a log flush,
and the cache was re-allocated afterwards. Now don't shut down or
re-allocate, but instead rely on the ata idle callback which is
called called on usb insertion to do the log flush.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30325 a1c6a512-1295-4272-9138-f99709370657
The buffer_offset paramter of audio_init_recording() is removed as it
was unused in both implementations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30310 a1c6a512-1295-4272-9138-f99709370657
Namely, introduce buffer_get_buffer() and buffer_release_buffer().
buffer_get_buffer() aquires all available and grabs a lock, attempting to
call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause
a panicf() (doesn't actually happen, but is for debugging purpose).
buffer_release_buffer() unlocks that lock and can additionally increment the
audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was
used temporarily only.
buffer_available() is a replacement function to query audiobuflen, i.e. what's
left in the buffer.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.
Further changes happened to mp3data.c and talk.c as to not call the above API
functions, but get the buffer from callers. The caller is the audio system
which has the buffer lock while mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.
audiobuf and audiobufend are local to buffer.c now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
%Vs(mode[, param]) : mode can be "invert", "color" (where param is the colour to use", "clear" to disable the current style, "gradient" where param is the number of lines the gradient should draw over.
%Vg(start colour, end colour, [text colour]), if this tag isnt used the list selection colours from the settings will set the gradient colours
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30302 a1c6a512-1295-4272-9138-f99709370657
* Every top level menu item now has a different screen number
* Playlist viewer and Playlist Catalogue browsers no longer share the same number
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30261 a1c6a512-1295-4272-9138-f99709370657
is set on a database entry and the dircache went offline. In this
case, retrieve() and get_next() need to abort and take the ramcache
offline as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30255 a1c6a512-1295-4272-9138-f99709370657
inlining format_str() and avoiding a string copy by printing directly
into the name buffer.
Also uses quite a bit less stack space.
En passant, made basename printing more robust by not limiting the
buffer into which the file pathname is fetched by the max size of the
resulting basename string. Also, fixed a potential buffer overrun in
format_str.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30248 a1c6a512-1295-4272-9138-f99709370657
Check free space before reading new data from disk, and do not forget
to account for the RAM-cache header.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30246 a1c6a512-1295-4272-9138-f99709370657
* Rename stuff to not re-use the term dircache
* Move cache to own struct
* Encapsulate retrieving entries a bit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30242 a1c6a512-1295-4272-9138-f99709370657
files with names differing only in capitalization. Thanks to Slasheri
for the fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30241 a1c6a512-1295-4272-9138-f99709370657
in formats and conditions. The basename is the non-directory part of
a file's pathname.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30230 a1c6a512-1295-4272-9138-f99709370657
truncation in tagnavi %formats using the standard
"%{width}.{truncation}s" format syntax.
String truncation is especially useful when using part of a string
tag, filename, or basename for sorting and %strip'ing. (Basename
support is forthcoming in a subsequent commit.)
Also renovated the format_str() code a bit (improved structuring,
removed code duplication) and increased the maximum length of a printf
conversion specification to 20 characters.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30229 a1c6a512-1295-4272-9138-f99709370657
This is done to make reboot more transparent. If a playlist has ended, there should be no difference between the player doing nothing for ten minutes and the player shutting down after the idle timeout and being restarted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30226 a1c6a512-1295-4272-9138-f99709370657
check the manual...
%Tl(..., &action) -> %Tl(..., action, repeat_press)
%Tl(..., *action) -> %Tl(..., action, long_press)
%Tl(..., !action) -> %Tl(..., action, reverse_bar)
and a new allow_while_lock to make the region fire when softlocked
these options must all be after the action name, but otherwise the order doesnt matter. And for the setting_inc/dec/set action the setting name must follow the action name, *then* the options
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30219 a1c6a512-1295-4272-9138-f99709370657
Modify the %Tl() tag to add a new region 'lock' which will lock/unlock the wps/sbs from touches (hardware buttons still work)
You can also specify a region to work when locked by prepending ^ to the action name (this is probably about to change though)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30218 a1c6a512-1295-4272-9138-f99709370657
Use the plugin buffer to save the playlist copy if there isnt enough buffer already allocated to the inram copy of the playlist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30184 a1c6a512-1295-4272-9138-f99709370657
This menu needs to be changed to a proper menu so the icons dont suck
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30180 a1c6a512-1295-4272-9138-f99709370657
* Playlists are treated similar to directories in the browser, they now open in the viewer when selected instead of automatically starting the playlist.
* Make the "Playlists" main menu item useful, it now displays the playlist catalog (and has been renamed accordingly)
* Default to storing playlists in the catalog
* Add a UI to move the catalog directory
(other minor stuff too)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30177 a1c6a512-1295-4272-9138-f99709370657
As constantly discussed in IRC, it is insane that dirfilter and party mode are defaults on the quickscreen, both have caused countless problems for users accidentaly enabling them.
This wont change anything for users who have changed their setting, only for people who left it default
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30176 a1c6a512-1295-4272-9138-f99709370657