Continuing from
FS#12204 , these patches remove some of the dependencies librbcodec has on the rest of Rockbox.
0001: puts equalizer settings in the parameters of dsp_set_eq_coefs, removing the need to access global_settings from dsp.c
0002: makes dsp_process yield each iteration instead of once each tick, which is tricky to do portably. If this is undesirable, I can work around it.
0003: moves some replaygain stuff around so dsp.c doesn't have to access global_settings.
0004: instead of dsp.c and tdspeed.c allocating buffers, buffers are allocated elsewhere and passed to dsp_timestretch_enable(). The necessary buffer size is determined by calling dsp_timestretch_get_buffer_size().
0005: replace get_audio_base_data_type() with audio_format_is_atomic(), removing a dependency on TYPE_PACKET_*.
0006: move autoresumable() to playback.c, removing another dependency on global_settings.
0001-rbcodec-refactoring-dsp_set_eq_coefs.patch
(16.1 KiB)
b/apps/menus/eq_menu.c | 65 ++++++++++++++++++++++++------------------------
b/apps/settings.c | 4 ++
b/apps/settings.h | 31 ++--------------------
b/apps/settings_list.c | 30 +++++++++++-----------
b/lib/rbcodec/dsp/dsp.c | 14 ++--------
b/lib/rbcodec/dsp/dsp.h | 3 +-
6 files changed, 59 insertions(+), 88 deletions(-)
0002-rbcodec-refactoring-make-DSP-yield-each-iter...
(1.5 KiB)
b/lib/rbcodec/dsp/dsp.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
0003-rbcodec-refactoring-replaygain.patch
(9.5 KiB)
b/apps/gui/skin_engine/skin_tokens.c | 28 ++++++--
b/apps/menus/playback_menu.c | 1
b/apps/misc.c | 19 +++++
b/apps/misc.h | 2
b/lib/rbcodec/dsp/dsp.c | 118 ++++++++++++++++-------------------
b/lib/rbcodec/dsp/dsp.h | 9 ++
6 files changed, 106 insertions(+), 71 deletions(-)
0004-rbcodec-refactoring-timestretch-buffer-alloc...
(7 KiB)
b/apps/main.c | 8 --------
b/apps/settings.c | 8 +++++++-
b/apps/settings_list.c | 2 +-
b/lib/rbcodec/dsp/dsp.c | 16 ++++++++++++----
b/lib/rbcodec/dsp/dsp.h | 3 ++-
b/lib/rbcodec/dsp/tdspeed.c | 28 +++++++++++++++-------------
b/lib/rbcodec/dsp/tdspeed.h | 3 ++-
b/lib/rbcodec/test/warble.c | 3 +--
8 files changed, 40 insertions(+), 31 deletions(-)
0005-rbcodec-refactoring-get_audio_base_data_type...
(4 KiB)
b/apps/playback.c | 9 ++++-----
b/lib/rbcodec/metadata/metadata.c | 12 ++++--------
b/lib/rbcodec/metadata/metadata.h | 2 +-
b/lib/rbcodec/test/warble.c | 2 +-
4 files changed, 10 insertions(+), 15 deletions(-)
0006-rbcodec-refactoring-autoresumable.patch
(5.2 KiB)
b/apps/playback.c | 58 +++++++++++++++++++++++++++++++++
b/lib/rbcodec/metadata/metadata.c | 65 --------------------------------------
b/lib/rbcodec/metadata/metadata.h | 4 --
3 files changed, 58 insertions(+), 69 deletions(-)
Edit: Nils was kind enough to remind me it's being made a lib that even the main rockbox build relies upon. I guess the reliance on the tick shouldn't be an issue in that case, and yields unneeded as a standalone.