1
0
Fork 0
forked from len0rd/rockbox
Commit graph

37241 commits

Author SHA1 Message Date
Christian Soffke
45746934c4 playlist_set_current: Fix outdated dircache filerefs
Entries from a previously playing playlist may not
have been replaced after selecting a track from
a different playlist in the Playlist Viewer when
playback was stopped (not paused), since the index
buffer of a playlist opened in the Playlist Viewer
is shared with the current playlist when nothing is
playing.

Change-Id: I939e302c73cabd0e9d969550143635e54db32bf0
2023-10-30 02:07:01 +01:00
Aidan MacDonald
1651254ba4 powermgmt: Don't force shutdown when externally powered
In rare cases, battery voltage at boot can be below the shutdown
threshold even if a charger is plugged in. This triggers a forced
shutdown and tells you to "RECHARGE!" despite there being plenty
of power available, which is annoying.

Tweak the forced shutdown check so it accounts for external power
sources; if any are present, battery voltage will be ignored.

Change-Id: Id6280b0b666df9eef31c37a03c07c9d6d3f50221
2023-10-29 11:22:01 +00:00
Christian Soffke
954dd0ff75 Playlist Viewer: Don't set unmodified after saving
90e3571 has made this redundant

Change-Id: Ic5cc374712d5eddfd4bd53ed083fa9ec2c5777c6
2023-10-29 01:29:18 +02:00
Christian Soffke
bdec7ed31b Suggest numbered filename when saving untitled playlist
+ update misleading comment for catalog_add_to_a_playlist's
m3u8name parameter (the keyboard picker will be shown even
if it's not NULL)

Change-Id: I7576a83fd40cdcdb7a912c90d8c1d9a8f25e277c
2023-10-28 18:24:00 -04:00
roman.artiukhin
831faa3b82 Rework auto playback frequency switch
Moved logic outside playback events to be executed early. Stops buffering when frequency change is detected (additional STATE_STOPPED state is introduced)

Removed no longer used AUDIO_START_REFRESH flag

Change-Id: Icfae61725a4d8ffb47380f561a011bda4841457b
2023-10-28 15:11:07 -04:00
Aidan MacDonald
90e35716e3 playlist: Rewrite playlist_save(), optimization & fixes
playlist_save() was a poorly thought out mess. This fixes the
glaring issues and hopefully ensures that saving the playlist
never loses state (such as queued tracks or modified status)
after save+resume.

Indices are now updated on the fly, which is faster and needs
no extra memory. But if an error occurs, the playlist will be
corrupted. There is currently no attempt to handle this since
errors should be unlikely, but some error handling needs to be
added in the future.

Change-Id: If8a5dbd6a596460be08ee0b7bab9f24337886ea4
2023-10-28 14:54:02 -04:00
Uwe Kleine-König
1ee152b5a4 sansaclipplus: enable usb-hid mouse support
Change-Id: Ifbebf9ff8474882a29378515e010e9c9d39df5c3
2023-10-27 19:31:41 +02:00
Solomon Peachy
0391f2410a FS13397: Fix ipodpatcher standalone build
Patch from revo

Change-Id: Ic41191c389d21861dec94f38418420d60f2596c3
2023-10-24 10:12:16 -04:00
roman.artiukhin
3d5dd97c48 Fix playing_id3_sync not properly syncing resume data
Fixes bookmark resume for tracks with different sample rates (should fix FS#13295)

Change-Id: I69c77f9397f9230381c31e7cf8b586bcbacd06fe
2023-10-22 09:26:20 -04:00
roman.artiukhin
4fb37ecbc6 Skip Length across tracks
Allows to use Prev button to skip length from the end of previous track.

Can be enabled with:
Settings -> Playback Settings -> Skip Length set to some time interval
and
Settings -> Playback Settings -> Rewind Across Tracks set to Yes

Change-Id: I99f234035a8a5acc9cbfe05ea83971ec5ddc59ea
2023-10-22 08:21:22 -04:00
Solomon Peachy
5c36643132 manual: Fix a formatting error in the database commit documentation
Change-Id: Idef95209db7bbef162eff0bed4bb83b4dbd5952c
2023-10-21 11:26:32 -04:00
Christian Soffke
34408af994 Fix warble error 4cfd7cc
Change-Id: I5609a1b98e00d5560a2c6523daf6da0025e421dd
2023-10-19 21:16:12 +02:00
Christian Soffke
4cfd7cc77d Track Info [Playlist] field: Add playlist name
For any selected track that is part of a playlist,
additional info about the list is now provided in
the [Playlist] field of the Track Info screen.

1) Asterisk indicates if playlist has been modified.
2) Playlist filename is visible, unless the current
playlist is *not* associated with a file on disk, in
which case the following will be shown instead:

- (Folder)    for unmodified folder playlists.
- (Dynamic)   for playlists that are neither associated
              with a playlist file, nor with a folder.

Change-Id: I9dcf7cbba4ac2e37b23413180a2b2bf4bbe5ee2a
2023-10-19 13:32:03 +02:00
Christian Soffke
759aaecdff Playlist Viewer: Eliminate 'dirty' flag
A playlist's explicit 'modified' flag is now used
for keeping track of whether it's been modified
in the Playlist Viewer, not just in case of the
currently playing list, but for other playlists
as well.

When you start playback of a track from the
Playlist Viewer, a playlist's 'modified'
status is now carried over to the current
playlist, so as to produce a warning when
there is an attempt to replace the list at
a later point. This also prevents (auto)
bookmarking of the playlist if it had been
modified in the Playlist Viewer prior to
becoming the current playlist. (Bugfix)

Change-Id: Ibc391fd69285f8a67d6ffb6d8c274df3d223974c
2023-10-18 18:23:57 +02:00
Christian Soffke
9cd4943950 Properties/Tagcache Track Info Retrieval: Skip files with errors (2)
Addendum to e3b2293

Don't abort even when the database has returned a filename,
since metadata retrieval may still fail.

Change-Id: I9e397c44a4c80f24e937f085efbd540f274822a0
2023-10-17 19:29:45 +02:00
Christian Soffke
f932522d8a WPS context menu: Set modified after reshuffle
Prevents incorrect bookmarking of permanently
(not just temporarily) shuffled playlists, which
need to be resaved, before they can be correctly
bookmarked.

Change-Id: I157d3be9d05117f7566ca72f3e736f96b42a165d
2023-10-17 12:29:41 -04:00
Christian Soffke
e3b22935f2 Properties/Tagcache Track Info Retrieval: Skip files with errors
File names exceeding the max length will not be retrievable
from the database. Skip such files, instead of cancelling
the operation at that point.

Change-Id: Ia6bc8a53be9ec181eb836956cc3d8b059b2d024f
2023-10-17 12:18:33 -04:00
Christian Soffke
f2af0711b0 Delete existing bookmark file when saving a new playlist
Deleting a playlist leaves its bookmark file behind.

When a new playlist was saved under the same name as an
existing bookmark file, unrelated bookmarks were shown
for the new playlist

Change-Id: I7332460a5f488c354f41195c8fff4cf4d66f4bbb
2023-10-17 12:05:57 -04:00
neofright
ebb7f33a9f Fix backlight undefined preprocessor typo
Change-Id: I8df1000def19688df57fab0c4c49e0c099e8060b
2023-10-16 20:36:48 -04:00
Solomon Peachy
5c791f2d2b lang: Update english-us "translation"
Change-Id: Icafb2252898483075ce02d3d7573c989917af8ec
2023-10-16 17:33:31 -04:00
William Wilgus
3c89adbdbd [Feature] lastfm_scrobbler don't return to plugin on WPS resume failure
if resume playback on start was set and there was nothing to
resume the menu was entered

Change-Id: Iab5f48e94f3de68091cf42781d6e3ab4575c1a84
2023-10-11 07:12:31 -04:00
Christian Soffke
75befe19ef Hide Bookmark menu for new dynamically generated playlists
The bookmark menu with the option to create a bookmark
was inadvertently displayed for new dynamic playlists,
that had no associated folder or playlist file on disk.
(e.g. after selecting some track from the database for
playback), until the playlist was modified by the user.

Change-Id: I9d6809e4d03603c651459415327f28e38162ad53
2023-10-10 12:03:52 -04:00
William Wilgus
a0c29d8857 db_commit swap threads, add ability to cancel, backup/restore
extends the db_commit plugin with the ability to delete the database
backup, restore, dis/enable auto-commit

Change-Id: Id61546e463d151399d2ac8459480e6adc5d6fac6
2023-10-10 05:48:37 -04:00
William Wilgus
eb13628bb8 [BUGFIX] yesno.c use TIME_AFTER macro
Change-Id: I52561dd70e182b3540638d6a7c05474e14fa7a2e
2023-10-09 20:23:03 -04:00
William Wilgus
ff0055ba6b list allow VOICE_ONLY strings
Change-Id: Ie42ba8de986a10f68e05af0ecdb735b020aa9d1a
2023-10-09 08:40:06 -04:00
Solomon Peachy
57713f6308 ipod: Support IAP remote MENU/SELECT/UP/DOWN keys in MODE2
Only the primary contexts (standard, wps, quckscreen, tree, radio)
handle the new keys so far.

Todo contexts:  Settings, keyboard, pitchscreen, bookmark, & recording.

Available docs for MODE4 don't list anything other than playback
controls, so it's not clear if there is a path forward here.

Change-Id: I91908092f75d96813e2e155e447129ba15f58051
2023-10-06 11:31:59 -04:00
William Wilgus
17a8a54780 [BugFix] tagcache/tagtree remove static buffer from tagcache_get_next
remove sizeof(buf) infavor of the actual size provided by bufsz

Change-Id: I9fc1b2ce0937526d7acbb98738c8eb1aef15683f
2023-10-06 09:17:25 -04:00
William Wilgus
2e184d129d [FixRed] db_commit
Non Tagcache targets

Change-Id: I0e6c1e8551859863105f97f393b308bca947c6d4
2023-10-05 22:59:05 -04:00
William Wilgus
f3baff762a [FixRed] db_commit add rb-> to plugin function
Change-Id: I9c47142c0075df47149805ec87effc6ee0b94a24
2023-10-05 22:33:01 -04:00
William Wilgus
f671c3339e [FixRed] db_commit plugin
Fix Hosted and Touchscreen targets

Change-Id: I3c7ef3ca6ebc0703e0455f3405b683dff1384864
2023-10-05 22:07:03 -04:00
William Wilgus
1ed640da24 [Feature] db_commit plugin allows a more verbose commit
prints logf messages to the screen buffer and dumps the
output to .rockbox/db_commit_log.txt

logs warnings about tags that can't
be displayed by the current font

adds an option to the tagcache using the file
.rockbox/database_commit.ignore to prevent auto commit

Change-Id: Ib381b3b6d9dd19d76c95d0e87e605f7378e29674
2023-10-05 21:24:37 -04:00
William Wilgus
6634a60bf0 tagcache/tagtree remove static buffer from tagcache_get_next
callers can supply their own buffer

Change-Id: I8996ecfb88e30926296a0cb0563cf6c46977323e
2023-10-03 21:54:19 -04:00
William Wilgus
eee48dca39 tagcache reduce stack usage in tmpbuf_insert and build_index functions #2
move some functions around for later ifdef for tagcache commit plugin

used fixed width variables in struct temp_file_entry

Change-Id: I7f66b15cd1bdf5abcefa700086d390d22d3b5e21
2023-10-03 13:56:00 -04:00
roman.artiukhin
69f62b7891 Codecs: mp4: Fix seek to end of track
Fix possible crash due to out of bound access.

Fixes FS#13371

Change-Id: I90d28fa89ceb22e6561d33abc5f2b4c7f32d323c
2023-10-03 18:36:22 +03:00
William Wilgus
b64d46d9d4 Revert "tagcache reduce stack usage in tmpbuf_insert and build_index functions"
This reverts commit 3bb3e3d1a6.

Reason for revert: lifetimes do not overlap but patch has issues

Change-Id: I3f831599dd1523c156205aa6565ff8afc2f4d8f6
2023-10-03 11:07:49 -04:00
William Wilgus
3bb3e3d1a6 tagcache reduce stack usage in tmpbuf_insert and build_index functions
move some functions around for later ifdef for tagcache commit plugin

used fixed width variables in struct temp_file_entry

Change-Id: Idf9c37d67fc048550366e3d3504601a19c31f31e
2023-10-03 10:08:13 -04:00
roman.artiukhin
7616822fbb Codecs: mp4: Ignore decode errors till next chunk present in lookup_table
In files with gaps between chunks and reduced lookup_table we can't properly detect all gaps in m4a_check_sample_offset. So just ignore decode errors till next chunk present in lookup_table

Change-Id: I317864dce6a2251cdb6ddb8c0ad4d7c1640cb7a1
2023-10-02 12:54:57 -04:00
William Wilgus
f017ef9617 [FixRed] android yesno dialog
add a dummy fn with not for future dev

Change-Id: I2afc06bb1eaeb19b4972b625b6245c2361d8b8e7
2023-10-01 12:21:54 -04:00
William Wilgus
1c47722226 [Feature] add a prompt to database commit on start-up
adds a new function:
gui_syncyesno_run_w_tmo(ticks, tmo_default_res, main_msg,yes_msg, no_msg)

when a database needs committed on start-up
a yes no prompt will appear if not answered within 5 seconds
it defaults to Yes

if instead you choose No next start-up you will be asked again

you could rebuild the db still and waste time but it wouldn't hurt
anything so I don't think that path needs blocked

Change-Id: I58411f6e6bfebb6f142d99f33a1e8885ae7785c1
2023-10-01 11:51:38 -04:00
Aidan MacDonald
7ccbd705f4 playlist: Rework playlist modified detection and dirplay
The modified state is now an explicit flag that has to be
set whenever a user-triggered modification occurs. This is
recorded in the control file to ensure it doesn't get lost
after resume. There may be some places I missed where the
modified flag should be set/cleared, but it seems to work
well enough right now.

Change-Id: I3bdba358fc495b4ca84e389ac6e7bcbef820c219
2023-10-01 11:05:29 -04:00
Aidan MacDonald
781f955aa2 Remove structec API
In my opinion this API is just not very useful - design is kind
of questionable. There are hidden limits on the struct size and
bugs on 64-bit platforms due to assuming sizeof(long) == 4.

At the end of the day, the only major user was the tagcache and
it's actually less code size to do endian swapping manually.

Change-Id: I451c7f1a10cf3e28744c32c0f1f39a710d5cc100
2023-10-01 12:10:41 +01:00
Aidan MacDonald
d3b588678f Remove structec API from tagcache
Replace structec usage with explicit endian swapping routines
for the various data types. Simplify endianness detection when
loading the database. Make foreign endianness support optional,
but leave it enabled for now.

Change-Id: Ia1efb72c8830f63bbe0e51f7271c4552b5279878
2023-10-01 12:10:41 +01:00
Aidan MacDonald
825ec0b601 Remove structec API from debug_menu.c
Change-Id: I6b35bcdc4e676e81faf5353ca01ba4bd728ffb14
2023-10-01 12:10:41 +01:00
Aidan MacDonald
18fc68401c Remove structec API from talk.c
Change-Id: I6e3bae2a893c932b67b4b5a7c4bf46060e5dc32a
2023-10-01 12:10:41 +01:00
Aidan MacDonald
1131320d48 Remove structec API from codecs
Change-Id: I1e67582c0521e6354b0175a11fcf690ae40dbd88
2023-10-01 12:10:41 +01:00
Aidan MacDonald
4745970974 playlist: Use PLAYLIST_QUEUED instead of PLAYLIST_QUEUE_MASK
We don't need two names for the same 1-bit field.

Change-Id: I71ed61198da8d6e4bf4d449d8704982918099f7d
2023-09-30 09:03:58 +01:00
Aidan MacDonald
a6eaffe40d powermgmt: Remove CURRENT_USB
CURRENT_USB overrides CURRENT_NORMAL when USB is plugged.
It defaults to 2 mA and wasn't defined on any target, but
this doesn't make sense to me. After all, the current
drawn by the CPU or other components won't change just
because USB was plugged in.

As far as I can tell, the only side effect of removing
this is reducing the estimated USB charging current.
This might mean CURRENT_MAX_CHG should be increased by
CURRENT_NORMAL on some (all?) targets to compensate,
but I'm not sure which targets would be affected.

Change-Id: I5aa5c3893ae1e4ce6b8803ab4e8c897d534eb08f
2023-09-30 03:21:52 -04:00
roman.artiukhin
d05f6aac2d Codecs: mp4: Skip FOURCC filetype chunk check
Instead of FOURCC it needs ignore-case text match. Also value can contain \0 ('m4a\0' instead of expected 'm4a ').But let's simply skip it and let decoder handle it.

Change-Id: I87eefcabbc9010481286257c26cee09e61d1221c
2023-09-29 08:21:27 -04:00
Aidan MacDonald
fee5013514 disk: Remember the partition number for each volume
Change-Id: Ied6b0a558eec57435f9299f3e3326714f5e3cdca
2023-09-28 18:07:26 -04:00
Aidan MacDonald
028f283ee5 disk: Add "struct volumeinfo" to store volume related info
Change-Id: Ifd338d38db127d7896c43d1d25e70d0fae29fa1c
2023-09-28 18:07:26 -04:00