can't open '' was confusing for users so pass the key to open plugin
in theory you could have a plugin that defaulted to these lang_ids
run but its good enough to tell the user what failed to open IMO
lang_id changes mess with open_plugin since it uses them as look-up keys
so add checks for LANG_LAST_INDEX_IN_ARRAY to the checksum
the plugin now removes entries with an invalid checksum
devices with harddrives only append their .dat file so have them skip entries
with invalid checksums and only notify user if a valid entry wasn't found
(these users can run the open_plugins plugin to remove invalid entries)
Change-Id: Icf157675beaccda785643d5a9ed032a7cde30f12
you could return values in the event callbacks that would never be processed
this would eventually cause a lua stack overflow
settop(0) eats all return values (if any)
Change-Id: Icac6b27e592b385421275d4bd899ed3fe1065669
Resume by offset was obviously inaccurate for ALAC -- it tried
to convert the offset to an elapsed time using the approximate
bitrate, which is going to be wrong for VBR files. This became
a problem since commit 26ffcd8f9f restored the ability to resume
by offset.
It turns out that m4a_seek_raw() has terrible resolution since
it can only seek to chunk boundaries, and lies about the real
sample position; basically the same issue that affected seeking
described in commit 4dd3c2b33e. Resuming by offset is still not
very accurate because of this. Prefer to resume by time first,
which is normally highly accurate (and never worse than offset)
but use the file offset if it's the only thing we have.
There were a couple time calculations still using 32-bit math,
so clean those up too to reduce issues due to rounding errors.
Change-Id: Idd3bccd67505f4e59e784d92e45ea80a273975bb
There's probably little benefit to using core_alloc_maximum() for
loading playlists since they are parsed incrementally. I/O speed
does not increase with increased read sizes beyond a certain point.
Read by 32 KiB chunks since that is what the buffering thread does.
Fall back to core_alloc_maximum() if a small allocation fails so
that buflib will try harder to free up space.
Change-Id: I08b94317d12b98af09ef2bd84aa1195c4c51d1b1
there isn't much difference from this function to strtok_r
now places a NULL in the last vector space permitting as well
Change-Id: Ibaaa1ad01b5054c41a6410788a2333b8d11a7cf7
Commit 034b6d5b prevented other Settings menus
on the same menu level from being displayed after
accessing one item's context menu
Change-Id: I378e1748b7f449ad34042a3c8c626488fc07a7d4
Similair to 41934360. To display 20+ hours long audiobooks without overlaps.
Removed tag duplicates
Change-Id: Ibf95594000459d340e47849bc97286657a72da2d
A bunch of public API calls take a wps_data struct argument,
but that's an internal type that doesn't have a direct getter.
Instead the skin engine provides a gui_wps struct as a way
to refer to a particular skin instance. Use that instead of
wps_data in the public API.
Change-Id: I13e1aa8df7f08ccfb789bb728d493ac8d7de1a9b
replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation
in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base
Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
Not sure if this is worth the added bin size yet but I will
see where I can use it to try and make it worth it
Change-Id: Icc299d3986172ff224a14be48da3bf065d728a66
The database only remembered what you'd selected when
ascending the menu hierarchy again from a lower level.
Now it restores a previous selection going in the other
direction as well, when you enter a new menu, as long
as the selection at the current level hasn't changed.
Change-Id: I5068287ff758a7cfebf1428e9b0ffd30e6ef541e
- gui_synclist_select_item will be called in the update_dir
function by dirbrowse()
- it is unnecessary to call when the tables opened by
tagtree_enter are not being displayed but are only being
used for inserting table contents into the current playlist.
Change-Id: Ib768b457b2baa7eb85cf73c6339fd4f603d03d90
Useful feature for audiobooks. To rewind from the end of the previous track - press rewind at the very beginning of the current track. So if you are in the middle of the track - first rewind till beginning then release and press rewind button again (Playback Settings -> Rewind Across Tracks option should be enabled)
Fixes FS#13290
Change-Id: I5d7f06f64ad76d1e8f7827fe594ccca5f621769d
splits on spaces also considers \r\n\f\v\t as mandatory breaks
I'm still working on the strptokspn function
my goal is to use it directly rather than storing the matched char
and modifying the source string with \0 in order to tokenize the output
--Done
Change-Id: I7f378b5b9c4df8f10899b9a55a98950afb3931dc
I have no idea what bug this could possibly "fix", and nothing
looks different on the sim after removing it. As far as I can tell
the Onda has no unique features that could cause the skin engine
to act flaky, so I'm willing to bet this workaround isn't needed.
Change-Id: I2c183786948f3fe9778e04134d04bdfe3c6db543
remove some unused calls and save some space by only grabbing font h once
it doesn't change throughout the function
Change-Id: Iec3b8b34150d15b36062cba59c8d365b751bd0f6
since its too early for the scroll engine just remove 'ver. '
cleanup the getstringsize calls, only need to calculate it once
Change-Id: I5e866733ed38ffa0bf34ce1b5e11ed3afd78a04a
Rockbox would go to a previously selected
menu instead of returning to the current one
when leaving the Shortcuts screen.
Change-Id: I3546e32def9124956cd9edc258e14db91d19fa22
getstringsize on SEPARATOR was overwritten by another call to
getstringsize
lang files use position to decide target strings 'RTC' was after targets using
different buttons therefore in error gained precedence
Change-Id: I40edc6c99140ac81bffd4c47d5e055ebc94ab1b2
Database and File Browser were sharing
each other’s selected item history before.
Since the database isn’t browsed
recursively, it’s probably unnecessary to
include its own history in the tree context
and its backups, saving.a little bit of memory.
Change-Id: I87c9aed6f7056bc481b8b7299089851ef28f9bc5
It makes it behave consistently with tree/playlists other menus. So it's possible to exit Shortcuts using Back button on Clip Zip or Power button on Rocker
Change-Id: I8a52422ed2d96d0727ddacf364f87878735c6e4c
The codec used 32-bit math for elapsed time <-> file position
calculations. The rounding errors seem to be the cause of poor
seek/resume accuracy on long VBR files; switching to 64-bit math
makes things much better.
Change-Id: Iba638d9e031a891022510c31c141cc4541e3f149
Resuming a track with "Resume Playback" or a bookmark is supposed
to pass both the file offset and elapsed time to the codec. Since
commit dfff938dff the offset has been getting zeroed because the
buffer handle wasn't open at the time of the buf_filesize() call,
causing it to return a negative error code.
Having a valid offset improves resume accuracy with some codecs,
like VBR MP3.
Change-Id: I8af7f001644f1ee1bd27ca3049a4cff2d2274149
It fixes Playback/Bookmarks Resume for long vbr mp3 files
It also fixes resume by time for asf files.
As a replacement for https://gerrit.rockbox.org/r/c/rockbox/+/4750
Change-Id: Iaa59b5862385f5fe91fdc2fb0b1fde8ce75c0b54