1
0
Fork 0
forked from len0rd/rockbox
Commit graph

17744 commits

Author SHA1 Message Date
William Wilgus
c3fd32bdf2 [Feature] playback logging from core
people don't like having to remember to run the TSR plugin so
lets meet them halfway

all tracks are added with timestamp, elapsed, length, trackname

added buffering for ATA devices

still needed:
-Done -- a plugin that parses for duplicates and reads the track info
to create the actual scrobbler log
(log can be truncated once dumped)
this should allow you to run the plugin at leisure

later I'd like to expand this logging to allow
track culling based on skipped songs..

remove the TSR plugin as hard disk no longer need to use it

Change-Id: Ib0b74b4c868fecb3e4941a8f4b9de7bd8728fe3e
2025-01-13 00:45:09 -05:00
Christian Soffke
e5c9846cb4 Playlist Catalogue: fix: "Save Current Playlist" may fail silently
- After rebooting, unless the current playlist
had been manually resumed already, the "Save
Current Playlist" option in the root menu's/
playlist catalogue's context menu failed to work.

- Eliminate error message attempting to view current
playlist when no control file present.

Change-Id: I58f1d3dc6f256fcee106ff5a17f69fa46d67b2e4
2025-01-09 06:10:46 +01:00
Christian Soffke
897a96996b Playlist Viewer: fix: deleting track starts playback
When playback was stopped (not paused), deleting
the first track of the current playlist started
playback.

Change-Id: I0bd09e1254399d003109215e4e8363a0cd045ac0
2025-01-08 23:23:33 -05:00
Solomon Peachy
8b01f939d8 hitiet ma8/ma9: add in keymaps for all plugins
Largely guesswork.

Change-Id: I8ab8d36de4bbdcf25dcf7d3442266bfb0a370b6f
2025-01-07 14:22:53 -05:00
William Wilgus
0b5f1b68e6 [Bugfix] Copy current lcd contents into empty background buffers
the manual states the following:
%V(0,0,-,-,-) %VB
Use %x(filename, 0, 0) to draw a backdrop image (If you want one!)
Then add %V(0,0,-,-,-)

if you forget then it causes display corruption
due to the uninitialized background buffer

instead make a copy of the current screen into the blank backdrop
so we won't be showing garbled data on the screen

Change-Id: I3f0df131d36537e91688e104c9445a604f657362
2025-01-06 02:26:11 -05:00
William Wilgus
907c91997e [FS#10686] Peakmeter on ipod 5g using too much CPU
I think this is probably a good idea in general

Change-Id: I124e8743a847aa12013ef3b93c8b318e42714b34
2025-01-05 16:57:18 -05:00
Christian Soffke
018ccf4e47 Playlist Viewer: Fix dir not updated after playlist removal
Missed this in 6a865f2430

If you entered the Playlist Viewer using the
context menu option "View", instead of from
the Playlist Catalogue, a playlist file that was
deleted due to the removal of all of its tracks
would still be displayed in the directory when
returning

Change-Id: I54ca34f70344e289d9e2cb413ee2a38e5bd7a92b
2025-01-05 21:41:18 +01:00
Christian Soffke
00066a4927 Playlist Viewer: slight simplification
1) Don't re-initialize the Playlist Viewer before
closing it, after making an on-disk playlist the
current playlist. It's obviously wasteful and this
seems to have only historical reasons that don't
apply anymore.

2) Naming adjustments:
- change "onplay" prefix to "context" (e.g.
pv_context_result context_menu, instead of
pv_onplay_result onplay_menu), since onplay requires
being aware of the history for it to make any sense
- rename update_lists to update_gui, to differentiate
it from update_playlist
- change update_viewer_with_changes to update_viewer

3) gui_synclist_del_item(playlist_lists) is not
needed anymore after removing a track, because we
already  indiscriminately reset the synclist's
number of items and reselect within the list's
new bounds from update_viewer_with_changes.

As a result, MODIFIED is applicable to both
reshuffling and to removing a track, so
ITEM_REMOVED can be eliminated as its own
enum value.

Plus, SAVED does not require a special case and
can be renamed to PL_UPDATE, so it is usable
when track display is adjusted, in order to
force an update of the playlist buffer.

Change-Id: Ic5202e03223a1ddbb9ff87e388a16ecde39165ef
2025-01-05 14:39:24 -05:00
Christian Soffke
6a865f2430 Playlist Viewer: Delete playlist when emptied
When you removed all tracks from an on-disk playlist,
you were asked whether you wanted to save it, which
would fail, but did not show any accompanying message.

Instead of trying to save the playlist, after getting
the confirmation, delete the playlist file from disk.

Change-Id: Iad54f2f490b15dd9c8a8fdfb8f12e58fd17d5e36
2025-01-05 14:39:24 -05:00
Christian Soffke
0012411fc5 playlist: Simplify playlist_load
Reset fd for the on-disk playlist at the place where
ownership is transferred in playlist_set_current (which
already has a note, that the playlist will be effectively
closed, but did not reset the fd).

Also ensure, that calling playlist_load closes the fd for
the on-disk playlist (and its control file), if any were
left open - even though this is not supposed to happen.

Generate name of control file in playlist_init to be more
consistent with the behavior for the current playlist.
Only a single playlist can be loaded in the playlist viewer
at the same time, so generating random names shouldn't be
needed.

Change-Id: I65e0fc07ce608c1d333a90447e18482787a98b8c
2025-01-05 14:39:24 -05:00
William Wilgus
22d921c55c [Bugfix] Plugins run by START_IN_SCREEN won't open another plugin
PLUGIN_GOTO_PLUGIN was using old key instead

Change-Id: If354bd441db7c0b0a476624c8c1dcb3d79f5d366
2025-01-04 15:18:35 -05:00
Christian Soffke
384c35418a FS#13537: format_sound_value alignment issue in themes
Positive values included a leading space, which
meant they weren't displayed center-aligned in
themes anymore.

Change-Id: Ibe75e9b81a2989c87630dd3ea78e4b90c6c74502
2025-01-03 13:45:14 -05:00
Solomon Peachy
af7ed73f31 FS#13539: Resync mikmod plugin with upstream
Brings it up to libmikmod 3.3.12, relased 2024-12-31

Also fix a segfault that only happened on simulators when using
non-default samplerates.

Change-Id: I2ade2d72a00edab5395328fe76a88a88516aac72
2025-01-03 11:34:24 -05:00
Christian Soffke
08c32cee7c Playlist Viewer: fix: Don't invalidate resume info unless current playlist
It makes no sense to prevent the current playlist
from resuming when some other playlist becomes empty.

Change-Id: Ibfb7a15b0826ed3baeefbc5060b13d73894b81e6
2025-01-03 01:03:28 -05:00
William Wilgus
888f4dbe57 [Fix Yellow] skin_backdrops.c screen is unsigned
Change-Id: Ib9a669f547c86d610b22ca85e761920dd5875243
2025-01-02 11:38:46 -05:00
William Wilgus
e65543cdc2 skin_backdrops cleanup
no functional changes.

remove some checks for screen when SCREEN_REMOTE
is not present

pack the skin_backdrop struct and use the space to remove
the static bool first_go variable

Change-Id: I17a96749d4995dd8124f3be4dd95bba58ee54b6d
2025-01-02 11:22:32 -05:00
Franklin Wei
07036061fc puzzles: update README.
Change-Id: I4e3306bdaa391f7aa698c67f00285975e398ee02
2025-01-01 19:13:04 -05:00
Franklin Wei
334c725a45 puzzles: clean up resync.sh script.
This script has grown into a bit of a maintenance nightmare over the years.
I've cleaned up and better documented some of the nastier bits.

Change-Id: I2bb95a89b1edc9a294d9e1112f5be1b877567356
2025-01-01 19:12:49 -05:00
William Wilgus
44e36aba94 skin_render small cleanup
should be no functional changes
looking at the blame for this file shows the buffer was made
static originally due to stack overflow.

Removing static buffer in favor of using the skin buffer
directly shouldn't cause a regression.

Change-Id: I941ed675c5ba8799bea678af61c196eb453a4788
2024-12-31 20:17:56 -05:00
Christian Soffke
fe78b07db6 Playlist Viewer: Address problematic index buffer sharing
Borrowing the index buffer of the current playlist
can be problematic, since it is possible to start
playback of a different playlist from the playlist
viewer without leaving the viewer, thereby causing
a collision.

As long as we have a sufficiently large plugin
buffer, take advantage of it, regardless of
playback state.

When playback is stopped, always resume the playlist
from the control file before loading it, even if the
playlist has finished playing, to prevent running
into invalid indices.

Note:
dcfrefs_handle is initialized to 0 automatically for
the static on_disk_playlist struct.

Change-Id: I2a05a6a51a088ea9ba73858c353525db9e61c36e
2024-12-31 10:08:31 -05:00
Christian Soffke
3389a08d56 dynamic playlist erase warning: skip for finished playlists
Change-Id: I9d209a011024e658ffc4da0a723ae8f9ec407702
2024-12-31 14:59:18 +01:00
Solomon Peachy
a8540390c2 FS#13536: Updated German Translation (Karl Huber)
Change-Id: Ib2a6e03496f9a1a50e853ef4d2edc830af99310b
2024-12-31 07:15:43 -05:00
William Wilgus
727d2ab749 wps skin_parser free up skin ram with int16_t
change ints to int16_t especially image and rect sizes

ditto font_ids

frees ~250 bytes in cabbie

Change-Id: I271be05a26e2090f6e1b11d809afd1c4bee32803
2024-12-31 01:53:20 -05:00
William Wilgus
ea5ca58dc6 optimize language.c lang_english_to_id()
speed up comparisons by getting length of the supplied english string
and filter based on length finally use our length to do memcmp since
we know where the null is already

Change-Id: I595f03ae4b08ee0d59bb9adacbe3b69f08991a9e
2024-12-30 23:17:57 -05:00
Christian Soffke
bfef0a2d6c PictureFlow: fix colors for keyboard and full screen tags
Change-Id: I2dfaf1ff982c6b1c7b7387d673818de7428f85a5
2024-12-27 19:15:09 +01:00
William Wilgus
0c4b78c011 [Bugfix] RTC_TOKEN_PRESENT is less than SKIN_TOKENS_RTC_BEGIN
this blocks the check for RTC_TOKEN_PRESENT

thanks, chris_s

Change-Id: I53a7d83d7cd8e5e9b9d6ea6eed016dc35571bcd3
2024-12-26 08:56:14 -05:00
William Wilgus
0a88b818e9 lua make memcheck script eat all available ram (incld audiobuf)
Change-Id: Ia202c9097324985a3a9a9c96be8422c38e79cb3e
2024-12-26 01:49:01 -05:00
William Wilgus
962e1b2e69 [Bugfix, ASAN] test_mem plugin fix OOB read in read_test()
asan correctly identified an out of bound read in the test_mem plugin
This shouldn't cause any issue in normal use since the data isn't used

Change-Id: I52acabc4649397f9dd2ba7979f9210529ced2071
2024-12-26 01:49:01 -05:00
William Wilgus
b07d7d6af0 skin_token.c, playback.c, add get_temp_mp3entry()
add function get_temp_mp3entry() to return a valid mp3entry from scratch_mem
UNBUFFERED_ID3
or if playback hasn't been started used statically allocated mp3entry
NEXTTRACK_ID3

Change-Id: I3909fb585e0f5ad590f917ce827e991440f1fe75
2024-12-26 00:58:51 -05:00
William Wilgus
b44f8f3723 [FixYellow] skin_tokens.c add a preprocessor directive that actually works
Change-Id: I4345093be1d953e80f0043f6edd361517f74069b
2024-12-25 01:40:53 -05:00
William Wilgus
4fe6ce91ec skin_tokens.c use static mp3entry if over 2k
Change-Id: I5c1130673d2caf1198aa65c2b84bc7102f768c3d
2024-12-25 01:27:52 -05:00
William Wilgus
6bec4597bf get_mp3entry_from_offset remove static from struct mp3entry
I think with the recent refactoring we should be able to put mp3entry
on the stack

it should be moved up a level anyway

Change-Id: Idd2af598c48545e3dbc774279b5d2b264012805e
2024-12-25 00:56:49 -05:00
William Wilgus
8981311800 skin_tokens.c break quickscreen items out to a function
rather than a function call for each qs item along with the data
for those calls in the switch for get_token_value()

it makes more sense to just have the qs_token function
handle all of the logic

Change-Id: I3b3072496611fc2c536eec33c7cdf9fb2ec67ee0
2024-12-24 12:43:26 -05:00
William Wilgus
25ab00465e metadata.c don't store encoder filename for all the decoders
there are only 4 encoder capable codecs just make it a function
and add a macro to keep it sane

Change-Id: Iac8833226434f8436bc678f3e409f462764d8fdc
2024-12-24 01:47:18 -05:00
William Wilgus
f6b13c0fd0 skin_tokens.c break rtc code and id3 into own functions
clean-up the switch a bit by putting rtc code in its own function

move the id3 tags to the default branch and only read id3
if its actually needed

Change-Id: I0a6fe9aea646defcfdda731c4c963977173c4133
2024-12-23 22:57:52 -05:00
William Wilgus
dfd01709c5 [Bugfix] theme %ss will overflow buffer, update %ft manual entry
%ss did not check for the size of the resulting string before
copying it to the buffer

%ft has a search text mode

Change-Id: I1321681c249251aafe0e39bcc510b9e81f0cd0d3
2024-12-22 23:59:31 -05:00
William Wilgus
7d1cdf3ece small cleanup skin_parser parse_album_art parse_image_load
bugfix parse_font_load() allow fonts with . in filename

Change-Id: Idcd201f624699e184e5181a46848c36b7e3fca49
2024-12-22 09:18:22 -05:00
William Wilgus
7c678f5e7a [Feature] %ft file text tags add prefix search
%ft(filename,search_text)
finds a line beginning with search_text strips search_text and returns
the remainder of the line

Change-Id: I06fe029b89aa60e4dbf34c039d180c75213519a4
2024-12-22 01:11:10 -05:00
William Wilgus
9c477e84ff [Bugix] %ft has access to the root of the drive using /
path_append treats a path starting with / as absolute
allowing escape by themes

Change-Id: I8e5fb55f01cacd5ec0fc5538d92dfcfbdceb6892
2024-12-20 22:59:03 -05:00
William Wilgus
774357e722 [Bugfix] Volume, track starting and track ending no default timeout
if no params are given these three supply a default
it wasn't being applied since it was guarded by the else{}

Change-Id: I2966fd7d8daa695d8b214461749c93b3e7883e51
2024-12-20 22:41:07 -05:00
Christian Soffke
727c800c0d Don't force gcc as host compiler + fix clang warnings
On MacOS, gcc is a symlink for clang.

Patch gets rid of the warnings produced by clang,
when it is set as HOSTCC, and fixes voicetools
compilation on MacOS when calling make voicetools
from the simulator directory.

lua rb_defines_helper:
format specifies type 'int' but the argument has
type 'long'

codecs: opus / speex (LOGF):
format '%ld' expects argument of type 'long int',
but argument 7 has type 'off_t'

gigabeat:
variable 'size' set but not used

rdf2binary:
a function declaration without a prototype is
deprecated in all versions of C

rbspeexdec:
passing 'unsigned char *' to parameter of type
'char *' converts between pointers to integer
types where one is of the unique plain 'char'
type and the other is not

hmac-sha1.c
defining a type within 'offsetof' is a Clang
extension

Change-Id: I90539906698868f9589650585d865aee9f7e8539
2024-12-20 05:29:18 +01:00
William Wilgus
b77c973d1a [Bugfix] line_alternators reset scroll state without new data
this is fallout from allowing a scroll item redisplay timeouts

prior to eb3e5eb  '[Feature] skinengine subline timeout hide line for n seconds'
the behavior could be seen sparingly
after we now have an alternator front and center with the next track scroll

unfortunately this results in strings never scrolling to completion

fix:
if the current line hasn't changed and we are not doing a
full screen refresh, don't invalidate the scroll viewport
(the scroll engine will still handle the user data changing
 if that actually occurred)

Change-Id: I10d4b8a05caa28de617dc6454520ce5426d69532
2024-12-19 11:32:26 -05:00
William Wilgus
12ea82d9e4 Allow scroll_all lists to resume scrolling lines
rather than reset the scrolling lines in list_draw()
when scroll_all = true
allow the scroller to take care of stopping lines
after the offset is known

this pretty much entirely the debug menus

Change-Id: I7069e0634d32b5ad8f92c294c5caf85373a7d480
2024-12-17 23:51:21 -05:00
Vencislav Atanasov
cf4bf5439e S5L8702: Introduce syscfg_read() and use it in the debug menu
This makes it possible to reuse the SysCfg reading logic in other places.

Tested on ipod6g (normal + bootloader).

Change-Id: Iae6de2ee671bce4edb0153d26c57579ad47d0335
2024-12-17 23:08:10 -05:00
Dana Conrad
7d3cc24dec FS#13519: multivolume: Ensure absolute paths get drive designation
Change-Id: I8419af670ca101b11bba29d9fd577f21fa22fd42
2024-12-17 21:18:06 -05:00
William Wilgus
33c0c9efae [Bugfix] Simulator doesn't scroll lists in plugins
unless lcd_update() is called the sim doesn't update scrolling
you CANNOT call it from the scroll thread its simply ignored

I suspect this has something to do with where the call to render
originates as thi is the only thing I can think of besides
a call to disable the render

see demos/rb_info > paths -- observe the lack of scrolling
see any menu in a plugin that exceeds screen width

Change-Id: Ic14dee4a34de29479d739e6a280d6cf1cc283719
2024-12-16 11:37:56 -05:00
Christian Soffke
15b18e478c plugins: properties: make file info displayable in fullscreen
Extend functionality for displaying info in fullscreen
to folders or files that aren't audio tracks (e.g., to
display the full length of a file name)

Change-Id: I73617e2fd7c291a3c49ddd1b108e418cf069d179
2024-12-16 01:44:53 -05:00
Vencislav Atanasov
1468649258 Convert non-ASCII characters to UTF-8 or C-string literals
Comments are converted to UTF-8.

Strings which are part of executable code are converted using C-string hex literals. A comment with the intended UTF-8 character is appended to such lines.

The "c"-looking character in mpa.c was actually a small cyrillic "s" (i.e. "с").

Change-Id: If3a889080ef60b8bf756ad9ada38baede93ce35b
2024-12-15 21:16:12 -05:00
Vencislav Atanasov
5d7c8a0df1 Convert non-ASCII characters to UTF-8
Comments and notes are converted to UTF-8. Already broken multibyte characters are fixed using common sense.

This patch contains no code changes.

Change-Id: Ia511ab84936cb2495ac17309493a9b98727a7902
2024-12-15 21:16:12 -05:00
Christian Soffke
8f5128da16 Show Track Info: Support fs tags in Playlist Viewer, Properties, and PictureFlow
Playlist Viewer falls back to splashf if there is not
enough plugin buffer space left for running the
view_text plugin .

Change-Id: I418731018b03f396270b68e5e2d2e69635df1af0
2024-12-16 00:20:10 +01:00