diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-15 13:09:45 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-15 13:09:45 +0000 |
| commit | 80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1 (patch) | |
| tree | 2598d3a019c33d6f9ea76010fd6d3a8301ef87a0 /apps/plugins/mpegplayer | |
| parent | 0f77db73469920f0b0006f696ddb36029338c378 (diff) | |
| download | rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.zip rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.tar.gz rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.tar.bz2 rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.tar.xz | |
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
Diffstat (limited to 'apps/plugins/mpegplayer')
| -rw-r--r-- | apps/plugins/mpegplayer/mpeg_settings.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 6c8a2b8..1ac2476 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -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: |