%pP reports playlist progress by position index, which treats every
track as equally long. For playlists with tracks of unequal length --
audiobooks with chapters anywhere from two minutes to an hour are the
motivating case -- position is a poor proxy for listening progress.
%pX reports the played percentage of the whole playlist by time: the
summed length of all preceding tracks plus the elapsed time in the
current one, relative to the playlist's total duration. It can be
used as a value, in a conditional, with %if(), or as a bar tag like
%pb.
If a playlist contains more than 500 tracks or the scan is taking too
long and the user aborts the tag will fallback to the behavior of %pP
except the progress through the current track will be included in the
returned percentage
--------------------------------------
Computing this needs every track's length, and reading metadata for
every track is too slow and disk-heavy for a tag that refreshes on the
WPS. Instead each track's length is estimated from its file size: the
skin engine scans the playlist in the background, a batch of files each
skin refresh, opening each file only to read its size (directory
metadata, no header parse). Size is turned into time by calibrating one
file of each type -- the first file of each extension is parsed once
with get_metadata to learn its bytes-per-second, and every later file
of that type reuses it. A single-format playlist, the usual audiobook
case, parses exactly one file and stat's the rest.
The result is an estimate -- bitrate varies within a type, especially
for VBR -- but it is cheap and accurate enough for a progress
indicator, and the playing track always contributes its exact elapsed
time. Per-track lengths are stored as two bytes of minutes each in a
movable buffer sized to the track count and allocated only while the
tag is in use; the cache is keyed on the track count and a crc of the
first, middle and last filenames, so a playlist swap or reshuffle is
caught. If the buffer cannot be allocated (a very large playlist on a
low-memory target) the tag falls back to position-based progress.
The buffer is allocated when playback starts (and when the now-playing
screen is opened with playback already active) rather than lazily on the
first WPS refresh, so the one-time allocation happens at a playback
boundary instead of during steady-state playback; it falls back to
allocating on first use if that point is missed.
Until the scan finishes the tag does not blank: it returns an instant
equal-weight estimate -- (completed tracks + fraction through the
current one) / track count -- which sharpens into the size-based value
as the scan fills in. So a theme can just use %pX and it is correct
from the first frame, and %?pX is true whenever a playlist is loaded.
Tested on a Sansa Clip Zip and in the simulator. On a 216-track,
~745 MB single-format audiobook playlist the length scan dropped from
~4150 ms (get_metadata on every track) to ~174 ms (one parse plus 215
file-size stats), roughly 24x lighter.
Change-Id: I6e572e78a10444bd513ddc77e30da04aa5153ef2
Was missing:
* Arabic Supplement
* Arabic Extended B
* Arabic Extended A
* Rumi Numerals
* Arabic Extended C
* Indic Isqaq Numerals
* Ottoman Siyaq Numerals
* Arabic Mathematical Alphabet Symbols
Worth noting that most of these are vanishingly unlikely to ever show up
in the context of Rockbox. (The exceptions are "Arabic Supplement" and
possibly the Mathematical Symbols)
Also corrected "Arabic Presentation" into two distint blocks, as
the characters between them (fe00-fe6f) are NOT indicative of RTL.
Change-Id: I0c5c547921c789d32425682c8c75edb21428f549
Commit d1be73c ("keyboard.c Use viewports, move text box pos")
moved the picker and edit line into dedicated viewports. Under an
RTL UI language these viewports get VP_FLAG_ALIGN_RIGHT, so
lcd_putsxy mirrors every call; with the per-character cell drawing
this reversed the picker grid and the edit line (Hebrew shown
reversed, Latin filenames backwards, wrong caret).
- Clear the alignment flag on the keyboard own viewports so the
picker grid and cell layout are no longer mirrored.
- Draw the edit line as a single string so the bidi engine reorders
mixed Hebrew/Latin correctly, and use the full line width.
- Compute the caret from the bidi (LTR-base) visual layout so it
lands at the insertion point, including mixed Hebrew+Latin text.
- Pick the edit-line direction and invert the left/right cursor
keys based on the text first strong character.
Change-Id: I79f1c444bc9121fd5018ad5f6f4148afe2c1a3e1
It can be used to choose which Apple Developer ID to use when signing the build of the Qt apps. By default, it uses ad-hoc signing, i.e. no Apple Developer ID is needed.
Change-Id: I5634e318f4949107eb954b729b2f8f1d60fad115
It is always enabled, except in the following situations:
* bootloaders
* warble or checkwps applications
* devices with less than 4MB of RAM
* imx233-based devices
imx233 is a special case; that will be backed out we figure out why
it fails to boot if the binary size exceeds 1MB.
Change-Id: If4a89e389f562bb5791a565fba99c830213473d3
- Remove libpath as the dirs are already in the search path. It doesn't help with QtPdf, QtVirtualKeyboardQml or QtVirtualKeyboard not being found (at least on my system). The native libraries are properly found and copied to the app bundle.
- Remove "|| true" at the end, as even though macdeployqt shows a bunch of "ERROR: " messages, it still exits with code 0
Note: This is a partial revert of bf273149. codesign is still required, the binary is killed with SIGKILL by the OS if the libraries are modified but the signature is not updated.
Change-Id: I2d7d4e32ed8043f302c163db4f89fc90cc921f88
Clipzip, ClipPlus other devices may be similar
Autoscan from the main menu and the device hangs at scanning 88.1
try to record with no station set and it just records static
Change-Id: I59fe17dde80736e4fae8445c0aea7fcf5e476317
Now there is zero overlap between what can be found in rbutil.ini
and the downloadable build-info.
Change-Id: Iba84dec39b062f69098bea62a286acfd36479226
Add search path for the Qt libraries, ignore the signature verification error and then re-sign again.
Co-authored-by: Qwen3.7-Plus
Change-Id: Ifa6232cd56e78e593b3395384dd2a98fa9cc67e5
Create a new target dmgbuild_venv which is added as a dependency of both RockboxUtility and RockboxThemeEditor so CMake understands that it's a shared dependency.
Co-authored-by: Qwen3.7-Plus
Change-Id: I417de25356885574546a7ae2a53ddbd44f6be557
ipodpatcher tries to unmount volumes that are not mounted e.g. the firmware partition, before making any changes. On macOS this fails with a non-zero exit code, causing the whole process (bootloader installation or uninstallation) to fail.
A proper fix would be to trace every path that uses ipod_reopen_rw(), and only call unmount if we expect the volume to be currently mounted.
Change-Id: Ieaa58da336216d5060465cfc2b7f5f8c729fe8b9
The simulator on macOS has been broken since macOS 26.4
was introduced. On macOS 26.4, 26.5, and the 27 beta,
thread setup fails in make_context (firmware/asm/thread-
unix.c), because sigaltstack returns an "Operation not
permitted" error. Fall back to SDL threads until this
can be fixed.
Also update GCC to keep it in sync with the latest
Homebrew formula
(https://formulae.brew.sh/formula/gcc).
Change-Id: Ib08ac81ede00c577f28a85c7886f716e7504bbe9
I accidentally added an extra character wittthe last patch by changing
< to <= in the process of testing this I realized spaces were sometimes
being included at the beginning of the line and also that sometime
sentences were being cut short even though they fit on the screen
Change-Id: Iee0ed64e18defad2acb3c107d334ea2a49bd5b6f
fix lua strpbrk function skipping the first accept chr
lua splash_scroller fix NULL pointer in brk due to lastbreak
not being reset on a new line
Change-Id: Ica0c9ee5f9194f5be54ab90ad16309adead1c207
the other items that scroll use the menu button and reset on STD_OK
OS stacks use STD_OK to scroll and any other button to reset
Change-Id: I1fa1caa322fe761c6f92d2d08cc418e78843863b
Fix FS#13832
If the remote is already plugged in when Rockbox boots, it stays dead
until you replug it. These remotes only send their identify packet
once at power-up, so we never see it and then throw away all button
events because lingo 0x02 was never negotiated. The OF doesn't care,
so accept ContextButtonStatus from unidentified devices too. Stray
bytes received before iap_setup() also made iap_getc() return false,
which the serial driver takes as "sync found" and locks autobaud onto
the wrong bitrate.
The ghost clicks come from the repeatbtn handshake. A held button
resends its down event every 30-100ms and each one re-armed
iap_repeatbtn, which stalls handling of the following packet. So
during a long press packets pile up, the event queue overflows, and
the leftovers replay as keypresses after you let go. Skipping fires
on button release which is why next/prev showed it the worst. Now
repeatbtn is only re-armed when the button state actually changes,
and iap_handlepkt() drains whatever complete packets are in the RX
buffer rather than relying on one queued event per packet.
While at it, fix two more things found along the way: the button
state is now written in one go (the temporary BUTTON_NONE could be
picked up by the button tick mid-update), and iap_rxlen is
decremented when a frame is received so the overflow check actually
does something.
Tested on ipodmini2g with an A1018 remote.
Change-Id: Ie18512e47d642fe6957fc010eaf79b6d2af4c070
Type 0 displays had to update the whole x line due to anything other
than a full line causing corruption and tearing
I figured out that flipping x and x_end
(LCD_W - x and LCD_W - x_end)
makes it work properly
Lowered the refresh rate to 95 Hz
Removed Fade in on screen enable
Change-Id: I0b8f76ad01ce7e48bd0a56aa321c30c30f91ce8d