diff --git a/src/gui/audio_setup.cpp b/src/gui/audio_setup.cpp index 0b51fdf13..e737ad34b 100644 --- a/src/gui/audio_setup.cpp +++ b/src/gui/audio_setup.cpp @@ -54,7 +54,7 @@ extern cAudio *audioDecoder; CAudioSetup::CAudioSetup(bool wizard_mode) { is_wizard = wizard_mode; - + width = w_max (40, 10); selected = -1; } @@ -68,18 +68,17 @@ int CAudioSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) { dprintf(DEBUG_DEBUG, "init audio setup\n"); int res = menu_return::RETURN_REPAINT; - + if (parent) { parent->hide(); } res = showAudioSetup(); - + return res; } - #define AUDIOMENU_ANALOGOUT_OPTION_COUNT 3 const CMenuOptionChooser::keyval AUDIOMENU_ANALOGOUT_OPTIONS[AUDIOMENU_ANALOGOUT_OPTION_COUNT] = { @@ -128,21 +127,27 @@ int CAudioSetup::showAudioSetup() //analog modes (stereo, mono l/r...) CMenuOptionChooser * as_oj_analogmode = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_MODE, &g_settings.audio_AnalogMode, AUDIOMENU_ANALOGOUT_OPTIONS, AUDIOMENU_ANALOGOUT_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_analogmode->setHint("", LOCALE_MENU_HINT_AUDIO_ANALOG_MODE); + //dd subchannel auto on/off CMenuOptionChooser * as_oj_ddsubchn = new CMenuOptionChooser(LOCALE_AUDIOMENU_DOLBYDIGITAL, &g_settings.audio_DolbyDigital, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_ddsubchn->setHint("", LOCALE_MENU_HINT_AUDIO_DOLBYDIGITAL); + //dd via hdmi CMenuOptionChooser * as_oj_dd_hdmi = new CMenuOptionChooser(LOCALE_AUDIOMENU_HDMI_DD, &g_settings.hdmi_dd, AUDIOMENU_HDMI_DD_OPTIONS, AUDIOMENU_HDMI_DD_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_dd_hdmi->setHint("", LOCALE_MENU_HINT_AUDIO_HDMI_DD); + //dd via spdif CMenuOptionChooser * as_oj_dd_spdif = new CMenuOptionChooser(LOCALE_AUDIOMENU_SPDIF_DD, &g_settings.spdif_dd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_dd_spdif->setHint("", LOCALE_MENU_HINT_AUDIO_SPDIF_DD); + //av synch CMenuOptionChooser * as_oj_avsync = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVSYNC, &g_settings.avsync, AUDIOMENU_AVSYNC_OPTIONS, AUDIOMENU_AVSYNC_OPTION_COUNT, true, audioSetupNotifier); - + as_oj_avsync->setHint("", LOCALE_MENU_HINT_AUDIO_AVSYNC); + //volume steps CMenuOptionNumberChooser * as_oj_vsteps = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_STEP, (int *)&g_settings.current_volume_step, true, 1, 25, NULL); + as_oj_vsteps->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTEP); //clock rec // CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier); @@ -150,17 +155,21 @@ int CAudioSetup::showAudioSetup() //SRS //SRS algo CMenuOptionChooser * as_oj_algo = new CMenuOptionChooser(LOCALE_AUDIO_SRS_ALGO, &g_settings.srs_algo, AUDIOMENU_SRS_OPTIONS, AUDIOMENU_SRS_OPTION_COUNT, g_settings.srs_enable, audioSetupNotifier); - + as_oj_algo->setHint("", LOCALE_MENU_HINT_AUDIO_SRS_ALGO); + //SRS noise manage CMenuOptionChooser * as_oj_noise = new CMenuOptionChooser(LOCALE_AUDIO_SRS_NMGR, &g_settings.srs_nmgr_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.srs_enable, audioSetupNotifier); - + as_oj_noise->setHint("", LOCALE_MENU_HINT_AUDIO_SRS_NMGR); + //SRS reverence volume CMenuOptionNumberChooser * as_oj_volrev = new CMenuOptionNumberChooser(LOCALE_AUDIO_SRS_VOLUME, &g_settings.srs_ref_volume, g_settings.srs_enable, 1, 100, audioSetupNotifier); - + as_oj_volrev->setHint("", LOCALE_MENU_HINT_AUDIO_SRS_VOLUME); + //SRS on/off CTruVolumeNotifier truevolSetupNotifier(as_oj_algo, as_oj_noise, as_oj_volrev); CMenuOptionChooser * as_oj_srsonoff = new CMenuOptionChooser(LOCALE_AUDIO_SRS_IQ, &g_settings.srs_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, &truevolSetupNotifier); - + as_oj_srsonoff->setHint("", LOCALE_MENU_HINT_AUDIO_SRS); + #if 0 CStringInput * audio_PCMOffset = new CStringInput(LOCALE_AUDIOMENU_PCMOFFSET, g_settings.audio_PCMOffset, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ", audioSetupNotifier); CMenuForwarder *mf = new CMenuForwarder(LOCALE_AUDIOMENU_PCMOFFSET, true, g_settings.audio_PCMOffset, audio_PCMOffset ); @@ -189,7 +198,7 @@ int CAudioSetup::showAudioSetup() #if 0 audioSettings->addItem(mf); #endif - + int res = audioSettings->exec(NULL, ""); selected = audioSettings->getSelected(); delete audioSettings; @@ -203,12 +212,11 @@ void CAudioSetup::setWizardMode(bool mode) is_wizard = mode; } - CTruVolumeNotifier::CTruVolumeNotifier(CMenuOptionChooser* o1, CMenuOptionChooser* o2, CMenuOptionNumberChooser *n1) { - toDisable_oj[0]=o1; - toDisable_oj[1]=o2; - toDisable_nj=n1; + toDisable_oj[0]=o1; + toDisable_oj[1]=o2; + toDisable_nj=n1; } bool CTruVolumeNotifier::changeNotify(const neutrino_locale_t, void * data) @@ -224,4 +232,3 @@ bool CTruVolumeNotifier::changeNotify(const neutrino_locale_t, void * data) return false; } -