Commit graph

64 commits

Author SHA1 Message Date
William Wilgus
c85a4f1fa4 menus remove reserved 'param' parameter
-- missed the plugin menu --

Change-Id: Iac2c9b0b8212ab5f3ac2ef90e1ac2723d212f86c
2022-12-17 04:24:37 -05:00
William Wilgus
ccf1aaa5be menus move functions with parameters to their own type
left the union with function(void) and function_w_param(param)
as a few areas might still need to use both (onplay.c)

there might be a few I missed yet..

Change-Id: I593a6875301923e19ba04ad1b0f3173dc9ebdf1f
2022-12-17 02:51:43 -05:00
William Wilgus
658cc95885 remove some sprintf putsxy calls in favor of putsxyf
we now have putsxyf in screens[] so no need for a separate
buffer in these cases

Change-Id: Ife0738e731f03d255f512bab3d5bb07b8be8693d
2022-11-21 00:25:12 -05:00
William Wilgus
0661784469 make int_setting step & unit int16_t
since int_setting is the largest struct in the union of settings
saving 32 bytes adds up over every setting

frees ~200 bytes

Change-Id: Id4722262e40db3021c740e138fe7352be10e2c70
2022-11-20 13:57:09 -05:00
William Wilgus
f6c719d7ec replace strlcpy with strmemccpy
replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation

in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base

Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
2022-11-14 23:56:16 -05:00
William Wilgus
c2220a3b50 eq_menu cleanup some getstringsize calls
remove some unused calls and save some space by only grabbing font h once
it doesn't change throughout the function

Change-Id: Iec3b8b34150d15b36062cba59c8d365b751bd0f6
2022-11-09 11:58:17 -05:00
Aidan MacDonald
6322e66219 Remove long-deprecated old style EQ settings
These were deprecated by 1eb17dc9f4 back in 2013 just prior to the
3.13 release. We've had 3.14 and 3.15 since then and I guess nobody
will complain if we finally remove them (fingers crossed...)

Also fix a line which got missed when converting hardcoded numbers
to EQ_NUM_BANDS in that commit.

Change-Id: I79dd71f1f2810bf19bc135999868fafc5fee6e04
2021-08-28 13:23:34 +00:00
Aidan MacDonald
30e96a3732 quickscreen: fix EQ enable not working in quickscreen
The EQ enabled setting needs to call into the DSP core when it's
changed but this was only hooked into the EQ menu. The quickscreen
uses option_select_next_val() so those DSP hooks were not getting
called because the setting did not have any callback defined.

It seems this bug was introduced by 362f7a3220 removing the blanket
call to settings_apply(). Other settings might be affected too.

Change-Id: Idcce5809c525fa619e6bdf1be50c98a5df103fec
2021-08-26 19:34:18 +00:00
Aidan MacDonald
2008b7d1b0 Fix yellow from d541a72a
Change-Id: I9c539035544d285da1941d2c1954cf2aa4d00087
2021-08-06 19:59:33 +01:00
Aidan MacDonald
d541a72a0e Bugfixes in eq_menu.c
Change-Id: Ibf754554f685d13ac00a49694fcecee459ff838f
2021-08-06 18:23:57 +00:00
Solomon Peachy
bc416ff590 misc: Only include rbpaths.h and string-extra.h in places that need it
(Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h)

Build-tested on rocker, erosq, mini2g, nano2g,
                xduoox3, clipzip, dx50, and uisim

Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5
2021-04-10 12:08:12 -04:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
William Wilgus
c39f95465b do_menu pass internal synclist reference to callback
keep running into the rigid nature of do_menu
it isn't too bad when you don't need voice but once
you do the fun awaits

do_menu likes to talk on menu enter which is in a loop when you use do_menu
I would like to move the processing to the callback
TOO BAD you only get an action and the menu_item_ex struct
you sent it when calling the function

Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
2020-07-19 22:10:26 +00:00
William Wilgus
dd40c46d50 Fix menu warnings
change offending bool return to int

warning: cast between incompatible function types from
'_Bool (*)(void)' to 'int (*)(void)' [-Wcast-function-type]

forgot to remove -- typedef int (*menu_function)(void);

Change-Id: Ie4c8d3ddb0fb7843c4ec584203350d658d6bee3e
2018-10-18 00:06:31 +02:00
Purling Nayuki
946c348e5c Fix incorrect language string reference in eq_menu.c
In most of the translations strings with SYSFONT in title is
translated. This leads to displaying problem in (at least) graphical
equalizer due to the lack of non-latin character support in the
built-in font.

Change-Id: I0d27a5358e4eb539d4247c84975d8501d7668836
Reviewed-on: http://gerrit.rockbox.org/727
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2014-01-26 16:26:00 +01:00
Jonathan Gordon
371b142b4b Fix advanced EQ menu
Change-Id: Ie2c3db2299fa2c34277e2118c922a93fa2420b9a
2013-02-18 18:54:14 +11:00
Jonathan Gordon
1eb17dc9f4 EQ settings: Rework the settings to clean up the config file.
Instead of 3 cfg lines per eq band there is now a single line
for each:
<config name>: <cutoff/center freq>, <q>, <gain>

In addition, the config value names make a bit more sense.

The old settings are still readable but config.cfg and any new
settings files will be written with the new config values. (The
old settings will be removed completly sometime after the next
stable release).

Also a slight rework of the advanced EQ menu UI

Change-Id: I9008658d36ded442a5f2f825916df42a3934cbef
Reviewed-on: http://gerrit.rockbox.org/394
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-02-09 13:05:32 +01:00
Hayden Pearce
d73c20933b 10 Band EQ w/Presets
- A 10 Band EQ for Rockbox w/ presets adapted
   from VLC
 - frequency stepping at 32, 64, 125, 250, 500
   1K, 2K, 4K, 8K, 16K

Change-Id: I85ad84d70a534edfc66c6ad9af8a76f022a02ec7
Reviewed-on: http://gerrit.rockbox.org/386
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-01-29 06:53:41 +01:00
Michael Sevakis
56f17c4164 Make rbcodec/dsp includes more specific.
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-04-29 17:31:30 -04:00
Michael Sevakis
c9bcbe202d Fundamentally rewrite much of the audio DSP.
Creates a standard buffer passing, local data passing and messaging
system for processing stages. Stages can be moved to their own source
files to reduce clutter and ease assimilation of new ones. dsp.c
becomes dsp_core.c which supports an engine and framework for effects.

Formats and change notifications are passed along with the buffer so
that they arrive at the correct time at each stage in the chain
regardless of the internal delays of a particular one.

Removes restrictions on the number of samples that can be processed at
a time and it pays attention to destination buffer size restrictions
without having to limit input count, which also allows pcmbuf to
remain fuller and safely set its own buffer limits as it sees fit.
There is no longer a need to query input/output counts given a certain
number of input samples; just give it the sizes of the source and
destination buffers.

Works in harmony with stages that are not deterministic in terms of
sample input/output ratio (like both resamplers but most notably
the timestretch). As a result it fixes quirks with timestretch hanging
up with certain settings and it now operates properly throughout its
full settings range.
Change-Id: Ib206ec78f6f6c79259c5af9009fe021d68be9734
Reviewed-on: http://gerrit.rockbox.org/200
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-29 10:00:56 +02:00
Sean Bartell
a6dea9e13d rbcodec refactoring: dsp_set_eq_coefs
dsp_set_eq_coefs now has parameters for the band settings, so it doesn't
need to access global_settings.

Change-Id: I29ac19fc353b15a79cb25f0e45132aef0881e4c9
Reviewed-on: http://gerrit.rockbox.org/138
Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-04-27 16:33:27 +02:00
Michael Sevakis
f637072632 Change EQ settings to use a struct array in global_settings.
The previous pseudo array access of separate members wasn't very
nice or clear.

Change-Id: I74a2b39bb9c71a1370a455c01c4d5a860765e040
Reviewed-on: http://gerrit.rockbox.org/179
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-03-12 00:18:33 +01:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Rafaël Carré
2dde958478 eq menu: remove write-only variable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28137 a1c6a512-1295-4272-9138-f99709370657
2010-09-21 09:10:01 +00:00
Rafaël Carré
45f3e5fb94 eq menu: remove write-only variable present since r8606
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28134 a1c6a512-1295-4272-9138-f99709370657
2010-09-21 08:32:49 +00:00
Thomas Martitz
d904597524 Use browse_folder() for browsing eq presets and languages.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27560 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 18:28:42 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Bertrik Sikken
6fef14bd16 Set svn:keywords property on .c and .h files that didn't already have it. Correct svn:executable property on some files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24165 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 14:28:09 +00:00
Jonathan Gordon
9d1832cfba fix FS#10870 - slightly change the viewportmanager theme undo-er to be able to force an update even if the theme isnt being toggled from off to on which caused WPS artifacts when leaving the WPS if the theme was enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24087 a1c6a512-1295-4272-9138-f99709370657
2009-12-21 05:19:12 +00:00
Jonathan Gordon
b2eb44ce0e FS#10824 - viewport/statusbar API rework.
Hopefully the only user visible changes are:
- fm and recording screens go by the statusbar setting (sbs or inbuilt)
- plugins go back to using the theme as they should for menus and lists
- splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later.
- hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed

New GUI screen rules:
* Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit
* Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly.
ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657
2009-12-09 07:25:46 +00:00
Nils Wallménius
3200d04d75 Make the formatter functions used by the settings return a pointer to avoid usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
2009-08-20 16:47:44 +00:00
Bertrik Sikken
0023943439 Fix duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 14:50:19 +00:00
Bertrik Sikken
09085a30f6 Remove unneeded #include "backdrop.h"
Remove unneeded #include "statusbar.h"


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20891 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 18:09:14 +00:00
Bertrik Sikken
30a2713b6e Clean up some more #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20243 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 18:37:32 +00:00
Jonathan Gordon
036fb05dfd Accept a quick patch from Alexander Levin to neaten up the #defines and comments from my earlier commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19897 a1c6a512-1295-4272-9138-f99709370657
2009-02-01 13:43:08 +00:00
Jonathan Gordon
80cb3551eb Statusbar handling fixes.
Fixes FS#9845 - %we/%wd wasnt working
WPS no longer resets the viewportmanger more than needed (was doing it twice/draw before)
screens can now enable/disable the statusbar easily ignoring the setting instead of needing special handling (fix for the radio screen coming soon)

minor glitch introduced in this commit... the statusbar in the WPS might disappear for a fraction of a second when it is entered, I need to track this down...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19894 a1c6a512-1295-4272-9138-f99709370657
2009-02-01 11:34:16 +00:00
Jonathan Gordon
8b9fdb540c redo how the statusbar updates are done. send the EVENT_GUI_ACTIONUPDATE event every time get_action() is called. The event wont be as realiable (timewise) as before, but seems to work better
This also fixes FS#9761.
Also set the lcd font back to the ui font from the debug screens which use sysfont


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19681 a1c6a512-1295-4272-9138-f99709370657
2009-01-05 09:59:11 +00:00
Jonathan Gordon
e74cc6d9da "fix" FS#9757 by handing the statusbar redraw event more correctly... the eqscreen needs to be converted to viewports to display the statusbar.
fix the colour chooser screen to work with the bar redraw also


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19680 a1c6a512-1295-4272-9138-f99709370657
2009-01-05 07:50:25 +00:00
Jonathan Gordon
1d2952df80 FS#7916 - Adapt graphical EQ to smaller screens (Fixes FS#9517)
This version still isnt ideal, but untill someone has time to do it properly (viewports, get rid of some hardcoded values) this will do.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19051 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 10:28:04 +00:00
Peter D'Hoye
205f3df781 Remove a viewport ambiguity by changing the screens width/heigth members into lcdwidth/lcdheight. Normal usercode should always use getwidth()/getheigth() as that returns the viewport width/height. Fixes issues that would have appeared in many places when introducing viewports with sizes != lcd sizes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17857 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 20:45:21 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Jonathan Gordon
fe9dca3d5b option_screen() now accepts a viewport
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17223 a1c6a512-1295-4272-9138-f99709370657
2008-04-23 11:07:40 +00:00
Dan Everton
ad74906e18 In the equalizer menu, switch to low-latency mode in the smallest scope rather than for the entire equalizer menu. Also mark some more functions as static.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16888 a1c6a512-1295-4272-9138-f99709370657
2008-03-30 09:31:09 +00:00
Jonathan Gordon
5ca1539969 the menu and list now accepts a parent viewport to draw in (and the menu can be told to not show status/button bars). This lays the groundwork to fix colour problems with plugin menus (see star.c for an example.) This hopefully fixes some button bar issues as well as theme problems.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16812 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 03:35:24 +00:00
Dan Everton
0466319a75 Try and only use the PCM buffer low latency mode in sound settings when we really need to.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16496 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 11:06:04 +00:00
Thom Johansen
39e2de8f1b Crossfeed settings used to be stored inverted in the cfg file for legacy reasons, change that and kill some identical formatting functions while we're at it. NOTE TO CROSSFEED USERS: this will completely garble your crossfeed settings, write them down if you want to keep them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15895 a1c6a512-1295-4272-9138-f99709370657
2007-12-08 01:45:04 +00:00
Dan Everton
5886efabf5 Save some bytes and reuse the settings saving code for eq preset saving.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15891 a1c6a512-1295-4272-9138-f99709370657
2007-12-07 10:59:07 +00:00
Dan Everton
d7e1f77146 Commit FS#7440. The iPod Video doesn't actually have a hardware equalizer. It does have hardware bass/treble settings with configurable cutoff. So make the bass/treble settings use the hardware and remove the hardware equalizer configuration.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15782 a1c6a512-1295-4272-9138-f99709370657
2007-11-24 07:51:00 +00:00
Stéphane Doyon
26e47f2ad5 Use dynamic menu voice callbacks to speak menu item names in the
"Simple EQ Settings" menu and the Peak filter item names in the
"Advanced EQ Settings" menu.
From FS#7563.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15043 a1c6a512-1295-4272-9138-f99709370657
2007-10-09 03:53:46 +00:00
Stéphane Doyon
5acf091046 Add a voice callback to dynamic menus, along side the text_callback.
From FS#7563.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15042 a1c6a512-1295-4272-9138-f99709370657
2007-10-09 03:48:56 +00:00