1
0
Fork 0
forked from len0rd/rockbox
Commit graph

36988 commits

Author SHA1 Message Date
Marcin Bukat
bf81914217 hwstub: Force alignment of the context buffer
Exception handling code assumes at least word alignment of the
context buffer. So far we were lucky that compiler placed it
correctly but after compiler upgrade I was hit by the bug
caused by missalignment of the context buffer.

Credit goes to pamaury
2023-09-27 22:49:09 +02:00
William Wilgus
4c533475d8 codec.h fix ifdef for older compilers
elifdef appears to be finally supported in C23
elif defined() works everywhere

Change-Id: I8ac6c215bedc81cc9ea8f79850be40cef131594b
2023-09-26 15:03:13 -04:00
roman.artiukhin
ec2c507e60 Support per file logging with LOGF_ENABLE in codecs
Codecs mostly use custom LOGF define for logging (i.e. see aac.c). Now such logging can be enabled in single file with #define LOGF_ENABLE

Change-Id: I36312fbcd2d9166fb1fe5ead31e7354342d8828d
2023-09-26 08:38:31 -04:00
William Wilgus
62db16c82c [BugFix] bookmark.c root_dir bookmark
in some calls to generate_bookmark_file_name()

len gets specified in order to not NULL terminate the buffer string
unfortunately, I missed the root_dir case in g#4839

Change-Id: I24d1360bbe72e6a1b2ed3332ff5854d039d58ca5
2023-09-23 11:19:59 -04:00
William Wilgus
fcc82dfdca [BugFix] REPEAT_ONE manual track skip
Still having problems with determining the type of track change

lets try just watching the audio_next/prev functions

Change-Id: Ie4233ff4d4bf49792a6549d7bcd169ff4b1afd20
2023-09-23 00:52:38 -04:00
roman.artiukhin
a45204f5df Codecs: mp4: Fix seek in files with single element in lookup_table
lookup_table offset shouldn't be zero terminated.
And fix possible out of bound access.

Change-Id: I212a5fcc1868a2ca519b0052b170e836276fe9de
2023-09-22 10:37:38 -04:00
Solomon Peachy
57a47ef67a calculator: Fix compile issue in mingw32
Change-Id: I7d70b4f0d6fd574575298b0709e78b9096801c07
2023-09-22 10:32:09 -04:00
Solomon Peachy
74ded2bdd7 settings: Fix up the remaining stragglers from 8cc3266b
Change-Id: I20e98d1e7cf13a59194f62935a8f46e96f83a1f9
2023-09-22 10:31:00 -04:00
Solomon Peachy
8cc3266b2a Settings: Rename INT/BOOL setting type enum to RB_INT/RB_BOOL
....Because INT and BOOL are already defined in mingw32.

Change-Id: I28ab8189c00002c8f68bc9d0c23d2ae78d9e33d0
2023-09-22 10:00:46 -04:00
Christian Soffke
cb3a6877fc RFC: Turn Playing Time function into plugin
Since this function already requires hitting the
disk, it may make sense to turn it into a plugin.

A minor advantage (apart from cleaning up onplay.c
and saving RAM) is that you can now access the menu
not just from the WPS context menu, but also from
the Shortcuts Menu or using the WPS plugin shortcut.

On the other hand,  TSR plugins would have to be
terminated when Playing Time is launched, as is
already the case for other plugins such as PictureFlow.

Change-Id: Iea85229486887463ffc52f05e33e2340437f69a4
2023-09-20 23:57:39 -04:00
Christian Soffke
6ac55adc88 Fix suggested file name when saving dirplay playlist
The suggested name was identical to the complete path
of the played folder, with a slash at the end, which,
if accepted, resulted in a file called only ".m3u8"
being saved there.

In case the path contained one or more dots, the string
was also stripped of the last dot and all chars following it.

Use Playlist Catalogue as the destination folder instead,
and pick last path component as the file name.

Change-Id: Ia2b7f7ebca746613d650bbab6d7a62ca1106efc6
2023-09-21 05:09:39 +02:00
Christian Soffke
8f3cb75df0 Delete bookmarks when replacing unrelated playlist
After saving a playlist to an existing file with
a different name, any saved bookmarks for the old
playlist were still displayed for the new one.

Change-Id: Ic2666bdaf7ec6e25456283fc15760c568dd7ac38
2023-09-21 04:55:25 +02:00
Christian Soffke
e43c703480 fiiom3k: Recording keymap adjustment
Long button presses to create a new file
were in conflict with button presses to
play/pause.

Pressing SELECT is now used to create a new file
(and start recording, if stopped),
pressing PLAY/PAUSE will start or pause recording.

Change-Id: If2e568b9b05500d73fd54b691262a64d1a0ff487
2023-09-21 04:48:57 +02:00
roman.artiukhin
35150b83d4 Codecs: mp4: Fix sbr detections for some files
Use logic from libfaad/mp4.c AudioSpecificConfig2 for sbr detection

Fixes FS#12856

Change-Id: I235aa27830aa99f1307b303347f7affe7deafbe3
2023-09-20 10:03:27 -04:00
roman.artiukhin
951e239517 Cache folder album art
Fixes FS#13372

Change-Id: Ia50f5252cb8375a97c093abeda89d830bf003ff3
2023-09-20 10:01:47 -04:00
roman.artiukhin
57409f52d5 Codecs: mp4: Accurate seek in large files with small lookup_table
Read sample_byte_sizes table on demand when it can't be cached

Change-Id: I2191be63ceebfd8b16e1e973e13c5b51986b6564
2023-09-20 11:43:39 +03:00
William Wilgus
e01055a287 [RFC] REPEAT_ONE manual track skip
I recently added track skipping while REPEAT_ONE was set

currently by registering a track skip callback
I'm not entirely happy with the additional constant overhead
of the event callback

Instead I went looking for a way to distinguish
a pending track skip from some limited testing
it appears to work just as well to compare
playback's skip_pending == TRACK_SKIP_AUTO
but the lack of lifetime control worries me slightly

Change-Id: Ic71b4c3925e991f5a1216d16ecd3af6cc777ef1e
2023-09-19 19:47:22 -04:00
Solomon Peachy
3dbf5a97ad alac: Fix warnings introduced in ac82a653bb
Change-Id: I96fc2b8637cb95c5bd14a6d77fc4b2339c4acd49
2023-09-19 12:36:02 -04:00
Solomon Peachy
ac82a653bb libm4a: Fix warnings introduced in 001a338e51
Change-Id: Ia915e6f8babbd71533f22af566e5c45c2b40fbe5
2023-09-19 11:47:38 -04:00
roman.artiukhin
001a338e51 Codecs: mp4: Reuse lookup_table index from seek in m4a_check_sample_offset
Change-Id: If2fc3038ce8db8ddf2991406a5cce294a857eadc
2023-09-19 11:13:19 -04:00
roman.artiukhin
ef7d6009b4 Codecs: mp4: Optimize m4a_check_sample_offset
Make optimization from 2358fabb actually work.
Fix potential out of bound access.
Remove redundant zero offset check.

Change-Id: I0a0ba04670b612d410ac17a761bd08c2915721b9
2023-09-19 11:13:19 -04:00
William Wilgus
f96f7cd941 [Feature] Skip to next file even if loop one is set.
repeat one till manually skipped

https://forums.rockbox.org/index.php/topic,54218.0.html

Change-Id: If2ea1cd892531c735c30c428dea3678806283a3b
2023-09-18 22:48:21 -04:00
roman.artiukhin
9242e4cadb Codecs: mp4: Small cleanup
Remove unnecessary frame modification

Change-Id: I884152a66477efea7cfcadc638f55352ad75fc41
2023-09-18 11:29:21 -04:00
roman.artiukhin
6acb6446e6 Codecs: mp4: Improve support for long files. Part 2
Don't store sample_to_chunk table and read data on demand instead (it's required only once for building lookup table). It allows to store 2x bigger lookup table.

Change-Id: Ida79d0c281040300d6561e124fe10ebacb0e4679
2023-09-18 11:29:05 -04:00
William Wilgus
3c9be11411 option_select HASFLAG guard macro expansion with parens
cheap insurance

Change-Id: I8b1fccfda55350a2197cbc261b06a8c8c9dd9c65
2023-09-18 00:17:06 -04:00
William Wilgus
e8a17b1282 option_select.c clean-up option_screen
No functional changes

Change-Id: I0409b76258ce8af5aa9c2e68a2070b6e25927d1c
2023-09-17 13:29:03 -04:00
roman.artiukhin
27aa95afcb Codecs: mp4: Fix seek in very large files
Samples count requires 64 bit

Change-Id: Ia54be57d7d15b3db19dbc29ff8a06671594abb4b
2023-09-15 09:08:18 -04:00
roman.artiukhin
d2f7777f7a Codecs: mp4: metadata: Fix time length in very large files
Fix 40 hours long book reported as 14 hours due to samples overflow

Change-Id: I5988d4492b1f51081fff921180de6fe384ab5f4f
2023-09-15 09:08:02 -04:00
William Wilgus
df51d49b22 [BugFix] F_CB_ONLY_IF_CHANGED Overlapped NVRAM
the flag I chose was already used for nvram settings
moved both CB flags to unused flags

Change-Id: I9fdbc88460b08654a06b4d5950712947eab04b79
2023-09-13 23:25:05 -04:00
William Wilgus
d8b995c642 speed up adding files from filetree WIP
open an insert context

add tracks using the opened context

release opened context and sync the playlist

Change-Id: Idea700ffcf42a38dc23e131c92a6c5d325833170
2023-09-12 22:07:41 -04:00
Christian Soffke
84450dfd5d Playback: Fix 'auto' frequency not applied when paused
A frequency change didn't go into effect immediately
when a user picked "Auto" for the sample rate, while
playback was paused

Change-Id: I254853b664c5b6812264fdaf81dfb8fbfff43dbf
2023-09-11 10:57:07 -04:00
William Wilgus
c8c3de9926 [Fix Red] Ability to control backlight for soft lock action
Change-Id: Ib8948a5c43dbc16707d45f81c192e21bf38215e3
2023-09-09 23:04:55 -04:00
roman.artiukhin
7bbaf74c5c Ability to control backlight for soft lock action
See Settings -> General Settings -> Display -> LCD Settings -> Backlight on Lock

Change-Id: I201cb1c2907bb6842bf5d0b7a657e9db27aa905a
2023-09-09 22:00:14 -04:00
William Wilgus
6b0e3fe775 Codecs: mp4: Improve support for long files, prevent endless loop
pretty unlikely but I think in a memory exaustion scenario
you might roll the uint8 over to zero and crash

Change-Id: If73dc64484f2d363446be068aa7bf8025407a2a7
2023-09-09 21:16:35 -04:00
Solomon Peachy
b3abb27179 FS13395: Update Italian Translation (Alessio Lenzi)
Change-Id: Ia9a3ded95b0e50cda3497310472564f3ee3563fb
2023-09-08 11:27:47 -04:00
roman.artiukhin
2c6dfd06a6 Codecs: mp4: Improve support for long files
Reduce lookup_table (seek accuracy) till it fits on device

Fixes FS#13049

Change-Id: I934de500a4383e17b82821afa2e0396a27061707
2023-09-06 16:49:30 -04:00
roman.artiukhin
a190d0ca9c Codecs: mp4: Skip unknown chunks
Needed for opening some m4b books (see FS#13049)

Change-Id: Id289451e6b2b8a7ad1f6b9f00ef512ab9692383d
2023-09-06 16:49:23 -04:00
William Wilgus
ed369e1d47 misc.c check_bootfile exit search loop after bootfile found
Change-Id: Ie2397de29e87dfb1d2fb73cb6eb42c94fdfbf356
2023-09-01 23:43:24 -04:00
William Wilgus
79b64a3fc7 setting_list.c playback frequency cleanup
moves the callback to settings_list

audio_set_playback_frequency now accepts an actual frequency
44100 192000 etc rather than an index

Change-Id: Ieb3fc79a7fe3f1ff050465c8cd8061027e4572ff
2023-09-01 19:32:27 -04:00
William Wilgus
873f49b1f0 settings_list add F_CB_ONLY_IF_CHANGED for settings
Recently I added F_CB_ON_SELECT_ONLY_IF_CHANGED in conjunction
with the shuffle and repeat settings

instead it makes more sense to make F_CB_ONLY_IF_CHANGED
and apply to all callbacks (F_CB_ON_SELECT_ONLY or on_exit)

Change-Id: I4376557d479aceb419f7b4b4e0998afc249c87ec
2023-08-29 09:26:41 -04:00
William Wilgus
e60ade1fbc [BugFix] last fm scrobbler not saving pending tracks on shutdown
Change-Id: If7b03220c466ccf3f27cdf13d2e0b50d6a312bdc
2023-08-29 02:48:51 -04:00
William Wilgus
1c80f53581 [Bugfix] shuffle shenanigans from g5288 Fix #13369 shuffle & repeat callbacks
shuffle and sort were called on startup before playlist_init
and also on setting switch even without select

repeat is also now handled in settings_list as well

after moving the callbacks to settings_list.c
there was then a problem of unintended callbacks on exit of the menus
fixed that with F_CB_ON_SELECT_ONLY

since the callback was called regardless of the setting being changed
on F_CB_ON_SELECT_ONLY which is preferable in some circumstances
I co-opted F_TEMPVAR to allow the callback only when the setting was changed
with the flag F_CB_ON_SELECT_ONLY_IF_CHANGED

Change-Id: I5265233bbb556dc06c45273e742be5d78510a806
2023-08-29 01:29:38 -04:00
roman.artiukhin
3883c978ab Fix MP3 VBR seek jumps in wrong direction for long files
Fix jumps in the wrong direction by seeking relative to the current position

Change-Id: I5ca3d5bcb256dd8fb1cd17e6149878190571d359
2023-08-28 14:04:56 -04:00
JJ Style
8a22660770 Fix #13369: shuffle setting not working from shortcut.
Setting in shortcut was not being handled as it had no callback.
In the settings menu it looks like the event is handled separately.
Added a shuffle callback to the setting so it is called when changed
from the shortcut.

Edit: move callback to within settings_list so playlist interface is
unchanged.

Change-Id: I3691acac1c73a80bf67c0b8b334009ef1655fdb0
2023-08-27 00:39:52 -04:00
Christian Soffke
03d326fc90 Remove obsolete alias for audio_record function
Rockbox doesn't support HW codec anymore

Change-Id: Ia20d3f02f0d9db88b23cf9074e4d76aa21fd53b0
2023-08-17 13:40:09 +02:00
Christian Soffke
e5ecff3db7 font.c: Fix regression introduced in a749a95
Index was increased by 2 instead of by 1
in each loop iteration

Change-Id: I58d6957d46880f4207421b79c3ea6aa6660fbde4
2023-07-08 17:51:19 +02:00
Solomon Peachy
102dc49ed9 libmusepack: Fix inconsistent definition of an array size
Change-Id: If91eed5a0cbce44723e9581dce7de02e644f7e3e
2023-07-02 20:45:16 -04:00
Solomon Peachy
9fd59557fc pdbox: Fix inconsistent function definition
Change-Id: Ia258f1d111cedf9698538a38a1b949a43199b92c
2023-07-02 20:45:16 -04:00
Aidan MacDonald
b1fac21e4e playlist: Fix wrong handling of playlists without UTF-8 BOM
add_indices_to_playlist() wrongly assumes playlist->utf8 means
the playlist has a UTF-8 BOM. It only means the file is UTF-8
encoded, and says nothing about the presence of a BOM.

Trying to seek past a BOM when there is none mangles the first
filename in the playlist. Avoid this by closing & reopening the
playlist, which ensures the BOM (or lack of it) gets detected
properly.

Change-Id: I222fa6fc31e941d0252f1895b393a51694b93b7c
2023-07-02 12:15:57 -04:00
Aidan MacDonald
3b1e95d480 playlist: Simplify get_track_filename()
Have get_track_filename() read track seek offset & insert type
itself to avoid duplicating code. Most callers are not interested
in that information, and only use it to call get_track_filename().

Change-Id: I46d50fda10e515f74e27eebdded8e281bbf4456f
2023-07-02 12:14:58 -04:00