Age | Commit message (Collapse) | Author |
|
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.
Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
|
|
rb core allows you to load custom keyboard layouts
this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout
use like so:
unsigned short kbd[64];
unsigned short *kbd_p = kbd;
if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
kbd_p = NULL;
rb->kbd_input(buf,sizeof(buf), kbd_p);
Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
|
|
adds (static) function tagtree_unload
frees all buflib allocations for tagtree
adds command %reload that allows a new tagnavi file to be loaded
without device restart
use it like so..
"Reload..." -> %reload
Allocations are now checked for validity (probably a good idea anyway)
Change-Id: I2b4b9b7e253f97f3e6575e0ea7a92905e004d47f
|
|
forum user chris_s noted an possible unhandled cache overflow
Change-Id: Ia79399d6581ef6b635578896519fda8126c731d7
|
|
change offending bool return to int
warning: cast between incompatible function types from
'_Bool (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
forgot to remove -- typedef int (*menu_function)(void);
Change-Id: Ie4c8d3ddb0fb7843c4ec584203350d658d6bee3e
|
|
I noticed that after booting with the external storage removed,
playing from tagtree, inserting the card, forcing dircache to
reallocate from the debug screen, and trying to reenter tagtree,
it would data abort because the dircache reallaction to a larger
size caused the tagtree buffer to move.
Adjustment to at least one pointer (csi) was missed. Since it's
non-trivial there to determine when things should be NULL and
when they shouldn't, add check for menu too before moving it.
As for the rest, who knows.
Change-Id: Iea6538a2091b4b47083f39296555efc47edf8ba8
|
|
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.
On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).
As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.
This commit also adds some documentation to events.h
Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
|
|
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.
Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.
To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.
Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:
* Codecs not able to use an offset such as VGM or other atomic
formats
* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet
The change re-versions pretty much everything from tagcache to nvram.
Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
|
|
Even though you can insert leading zeros that makes ascii sort work for
numbers, sometimes the leading zeros don't suffice. In order to always
sort numerically strnatcasecmp() is needed.
With the default tagnavi.config this affects albums with discnum > 9
or tracnums > 99. This FS#12888.
Change-Id: Ie265c86eaf6dd07b6beda9e5eef25eb81eef8fd4
|
|
* Remove explicit tracking of elapsed time of previous track.
* Remove function to obtain auto skip flag.
* Most playback events now carry the extra information instead and
pass 'struct track_event *' for data.
* Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes
it cleaner and removes the struct mp3entry.
Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
|
|
Change-Id: I4adb8a152e9b99fcd26d95da7334d7d0cbe2a036
|
|
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
|
|
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
|
|
%strip to partially loaded (chunked) database results.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30247 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
|
|
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
|
|
It was committed by accident (it's on FS still).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30157 a1c6a512-1295-4272-9138-f99709370657
|
|
bsearch() is a general purpose binary search function for arrays.
It's supposedly faster than looping over arrays.
The array needs to be sorted in ascending order under the provided
comparison function. If the key and array element are of the same kind,
then the same compare function can be used for qsort() and bsearch().
Code taken from glibc.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30155 a1c6a512-1295-4272-9138-f99709370657
|
|
fails if lines ended with <CR><LF> sequence.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30058 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30029 a1c6a512-1295-4272-9138-f99709370657
|
|
allocated or used independently.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30028 a1c6a512-1295-4272-9138-f99709370657
|
|
many %format specifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30006 a1c6a512-1295-4272-9138-f99709370657
|
|
FS#10992 - make the <Untagged> string translatable):
* The translation was done too early: before the tagnavi format
clauses were checked. This prevented comparisons against
"<Untagged>" when a non-English translation was active.
* The code overwrote the buffer containing the constant string
"<Untagged>" with the translation. This is neither safe nor
necessary: The result pointer simply can be swapped with a pointer
to the translation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29941 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29937 a1c6a512-1295-4272-9138-f99709370657
|
|
Logical-AND ("&") always takes precedence over logical-OR.
(Parentheses are not supported.)
Fight binsize increase by storing some common expressions in local
variables. This avoids repeated reevaluations involving memory
accesses.
check_clauses: Fail clause (return false) in case of errors (tag too
long, DB entry deleted).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29851 a1c6a512-1295-4272-9138-f99709370657
|
|
immediately. The setting affects a buffer that is allocated during boot, so code using that buffer should use the value that was in effect during boot. Add a note to the manual that a reboot is needed for the changes to be applied.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29798 a1c6a512-1295-4272-9138-f99709370657
|
|
commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657
|
|
track is interrupted within the first 15 seconds.
Regard a rewind to 0:00 as a track restart (updating resume position /
playback statistics before the rewind and starting the 15 s delay).
This allows skipping forward across an unplayed track without changing
its resume offset. Also, it is possible to skip backward to the
previous track after rewinding to the current track to 0:00 (pressing
Left twice) without losing the current track's resume position.
Initially contributed by Dave Slusher
Caveats:
* Works only for SWCODEC
* Skipping forward without altering the resume position does not work
when skip to outro has been turned on.
* The 15-second window in which the resume offset will not be updated
should start at the initial resume position, not at 0:00. This
would allow skipping over partially played tracks without altering
the resume position.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29250 a1c6a512-1295-4272-9138-f99709370657
|
|
Fix for FS#11856: In tagtree_buffer_event, do not wait for database to
come online as that may never happen. Rather, wait until it either
has come online or has decided that this will never happen. Added a
new function to tagcache.c to export this information.
Flyspray: FS#11865
Author: Michael Hohmuth
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29081 a1c6a512-1295-4272-9138-f99709370657
|
|
understand HWCODEC and have no way to test builds for it. For now just disable it. In the long term it would be nice to support this on HWCODEC, or failing that, clean this up a little more.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28943 a1c6a512-1295-4272-9138-f99709370657
|
|
resuming any song that is not played to completion at any point later in time, regardless of how many intermediate tracks are played. This is accomplished by expanding the database to record incompletely played tracks. Currently, the feature is simply on or off, in which case all tracks automatically resume, or they do not. The remainder of patches in the task expand this feature by allowing only certain file to automatically resume, only resuming in certain circumstances, etc but are not included until we reach agreement on what should be included. Additionally, the manual will need to be updated once we agree on the available settings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28942 a1c6a512-1295-4272-9138-f99709370657
|
|
Wait for the db to be ready before trying to to any runtime stats
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28608 a1c6a512-1295-4272-9138-f99709370657
|
|
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants.
Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know).
For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one,
the values can be retrieved via the new dir_get_info().
Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
|
|
translatable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26192 a1c6a512-1295-4272-9138-f99709370657
|
|
directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
|
|
playlist from the database (a bit of a hack, but not bad enough to outright reject)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24089 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23444 a1c6a512-1295-4272-9138-f99709370657
|
|
to return anything, and should take a data parameter.
Fixing it because correcting the event api prototypes causes many warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657
|
|
intended (according to r16432: hide until 0.5s have passed, but never if the disk isn't spinning).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22442 a1c6a512-1295-4272-9138-f99709370657
|
|
better consistency all over the place. Change checking for its return value (style-wise) at some places too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22269 a1c6a512-1295-4272-9138-f99709370657
|
|
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
|
|
data retrieval problems, races, data corruption of sorted index files at the end with junk data, access to unitialized memory and so on. Should fix FS#8710 and may fix FS#8414.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21402 a1c6a512-1295-4272-9138-f99709370657
|
|
flagging each tag that is a member of the set, and replace the membership tests with a shift and bitwise and. The test is still done inside a function on SH, as this saves some space vs the macro used on other targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21175 a1c6a512-1295-4272-9138-f99709370657
|
|
#including plugin.h (which #includes root_menu.h), which will be needed for pictureflow in the database (I have some code for that).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21137 a1c6a512-1295-4272-9138-f99709370657
|
|
uppercase for its constants as per docs/CONTRIBUTING.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21135 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21010 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20249 a1c6a512-1295-4272-9138-f99709370657
|