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.tar.gz rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.zip |
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 6c8a2b8e3e..1ac2476b25 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) | |||
403 | switch (setting) | 403 | switch (setting) |
404 | { | 404 | { |
405 | case MPEG_AUDIO_TONE_CONTROLS: | 405 | case MPEG_AUDIO_TONE_CONTROLS: |
406 | #if defined(AUDIOHW_HAVE_BASS) || defined(AUDIOHW_HAVE_TREBLE) | ||
406 | if (global || settings.tone_controls) | 407 | if (global || settings.tone_controls) |
407 | { | 408 | { |
409 | #ifdef AUDIOHW_HAVE_BASS | ||
408 | val0 = rb->global_settings->bass; | 410 | val0 = rb->global_settings->bass; |
411 | #endif | ||
412 | #ifdef AUDIOHW_HAVE_TREBLE | ||
409 | val1 = rb->global_settings->treble; | 413 | val1 = rb->global_settings->treble; |
414 | #endif | ||
410 | } | 415 | } |
411 | else | 416 | else |
412 | { | 417 | { |
418 | #ifdef AUDIOHW_HAVE_BASS | ||
413 | val0 = rb->sound_default(SOUND_BASS); | 419 | val0 = rb->sound_default(SOUND_BASS); |
420 | #endif | ||
421 | #ifdef AUDIOHW_HAVE_TREBLE | ||
414 | val1 = rb->sound_default(SOUND_TREBLE); | 422 | val1 = rb->sound_default(SOUND_TREBLE); |
423 | #endif | ||
415 | } | 424 | } |
425 | #ifdef AUDIOHW_HAVE_BASS | ||
416 | rb->sound_set(SOUND_BASS, val0); | 426 | rb->sound_set(SOUND_BASS, val0); |
427 | #endif | ||
428 | #ifdef AUDIOHW_HAVE_TREBLE | ||
417 | rb->sound_set(SOUND_TREBLE, val1); | 429 | rb->sound_set(SOUND_TREBLE, val1); |
430 | #endif | ||
431 | #endif /* AUDIOHW_HAVE_BASS || AUDIOHW_HAVE_TREBLE */ | ||
432 | |||
433 | #ifdef AUDIOHW_HAVE_EQ | ||
434 | for (val1 = 0;; val1++) | ||
435 | { | ||
436 | int setting = rb->sound_enum_hw_eq_band_setting(val1, AUDIOHW_EQ_GAIN); | ||
437 | |||
438 | if (setting == -1) | ||
439 | break; | ||
440 | |||
441 | if (global || settings.tone_controls) | ||
442 | { | ||
443 | val0 = rb->global_settings->hw_eq_bands[val1].gain; | ||
444 | } | ||
445 | else | ||
446 | { | ||
447 | val0 = rb->sound_default(setting); | ||
448 | } | ||
449 | |||
450 | rb->sound_set(setting, val0); | ||
451 | } | ||
452 | #endif /* AUDIOHW_HAVE_EQ */ | ||
418 | break; | 453 | break; |
419 | 454 | ||
420 | case MPEG_AUDIO_CHANNEL_MODES: | 455 | case MPEG_AUDIO_CHANNEL_MODES: |