mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Gigabeat S: Fully enable access to hardware tone controls and 3-D effect feature. Under the hood, it's designated a hardware equalizer since it is one. Implement code framework for hardware EQ in general. Menu aspect is well abstracted and so the UI and strings can be changed around if taste doesn't quite suit. So far the emphasis is distinction of the UI labelling from the software EQ so that it's clear the settings are for a different thing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26051 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0f77db7346
commit
80d0d15ca9
18 changed files with 1390 additions and 66 deletions
|
@ -403,18 +403,53 @@ static void sync_audio_setting(int setting, bool global)
|
|||
switch (setting)
|
||||
{
|
||||
case MPEG_AUDIO_TONE_CONTROLS:
|
||||
#if defined(AUDIOHW_HAVE_BASS) || defined(AUDIOHW_HAVE_TREBLE)
|
||||
if (global || settings.tone_controls)
|
||||
{
|
||||
#ifdef AUDIOHW_HAVE_BASS
|
||||
val0 = rb->global_settings->bass;
|
||||
#endif
|
||||
#ifdef AUDIOHW_HAVE_TREBLE
|
||||
val1 = rb->global_settings->treble;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef AUDIOHW_HAVE_BASS
|
||||
val0 = rb->sound_default(SOUND_BASS);
|
||||
#endif
|
||||
#ifdef AUDIOHW_HAVE_TREBLE
|
||||
val1 = rb->sound_default(SOUND_TREBLE);
|
||||
#endif
|
||||
}
|
||||
#ifdef AUDIOHW_HAVE_BASS
|
||||
rb->sound_set(SOUND_BASS, val0);
|
||||
#endif
|
||||
#ifdef AUDIOHW_HAVE_TREBLE
|
||||
rb->sound_set(SOUND_TREBLE, val1);
|
||||
#endif
|
||||
#endif /* AUDIOHW_HAVE_BASS || AUDIOHW_HAVE_TREBLE */
|
||||
|
||||
#ifdef AUDIOHW_HAVE_EQ
|
||||
for (val1 = 0;; val1++)
|
||||
{
|
||||
int setting = rb->sound_enum_hw_eq_band_setting(val1, AUDIOHW_EQ_GAIN);
|
||||
|
||||
if (setting == -1)
|
||||
break;
|
||||
|
||||
if (global || settings.tone_controls)
|
||||
{
|
||||
val0 = rb->global_settings->hw_eq_bands[val1].gain;
|
||||
}
|
||||
else
|
||||
{
|
||||
val0 = rb->sound_default(setting);
|
||||
}
|
||||
|
||||
rb->sound_set(setting, val0);
|
||||
}
|
||||
#endif /* AUDIOHW_HAVE_EQ */
|
||||
break;
|
||||
|
||||
case MPEG_AUDIO_CHANNEL_MODES:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue