Merge branch 'master' into pu/mp

This commit is contained in:
Jacek Jendrzej
2017-09-13 13:40:40 +02:00
44 changed files with 349 additions and 687 deletions

View File

@@ -167,20 +167,19 @@ int CAudioSetup::showAudioSetup()
CMenuOptionChooser * as_oj_avsync = NULL;
CMenuOptionNumberChooser * as_oj_vsteps = NULL;
CMenuOptionNumberChooser * st = NULL;
if (!g_settings.easymenu) {
//av synch
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
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);
//av synch
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);
st = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_START, &g_settings.start_volume, true, -1, 100, NULL, CRCInput::RC_nokey, NULL, 0, -1, LOCALE_OPTIONS_OFF);
st->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTART);
//clock rec
//CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier);
}
//volume steps
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);
st = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_START, &g_settings.start_volume, true, -1, 100, NULL, CRCInput::RC_nokey, NULL, 0, -1, LOCALE_OPTIONS_OFF);
st->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTART);
//clock rec
//CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier);
#if HAVE_COOL_HARDWARE
/* only coolstream has SRS stuff, so only compile it there */
@@ -206,20 +205,20 @@ int CAudioSetup::showAudioSetup()
// ac3,pcm and clear volume adjustment
CMenuOptionNumberChooser *adj_ac3 = NULL, *adj_pcm = NULL;
CMenuForwarder *adj_clear = NULL;
if (!g_settings.easymenu) {
adj_ac3 = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_AC3,
(int *)&g_settings.audio_volume_percent_ac3, true, 0, 100, audioSetupNotifier);
adj_ac3->setNumberFormat("%d%%");
adj_ac3->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_AC3);
adj_pcm = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_PCM,
(int *)&g_settings.audio_volume_percent_pcm, true, 0, 100, audioSetupNotifier);
adj_pcm->setNumberFormat("%d%%");
adj_pcm->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_PCM);
adj_ac3 = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_AC3,
(int *)&g_settings.audio_volume_percent_ac3, true, 0, 100, audioSetupNotifier);
adj_ac3->setNumberFormat("%d%%");
adj_ac3->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_AC3);
adj_pcm = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_PCM,
(int *)&g_settings.audio_volume_percent_pcm, true, 0, 100, audioSetupNotifier);
adj_pcm->setNumberFormat("%d%%");
adj_pcm->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_PCM);
adj_clear = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_CLEAR, true, NULL, this, "clear_vol_map");
adj_clear->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_CLEAR);
adj_clear = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_CLEAR, true, NULL, this, "clear_vol_map");
adj_clear->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_CLEAR);
}
//paint items
audioSettings->addIntroItems(LOCALE_MAINSETTINGS_AUDIO);
//---------------------------------------------------------
@@ -231,13 +230,11 @@ int CAudioSetup::showAudioSetup()
audioSettings->addItem(as_oj_dd_spdif);
audioSettings->addItem(as_oj_ddsubchn);
//---------------------------------------------------------
if (!g_settings.easymenu) {
audioSettings->addItem(GenericMenuSeparatorLine);
audioSettings->addItem(as_oj_avsync);
audioSettings->addItem(as_oj_vsteps);
audioSettings->addItem(st);
//audioSettings->addItem(as_clockrec);
}
audioSettings->addItem(GenericMenuSeparatorLine);
audioSettings->addItem(as_oj_avsync);
audioSettings->addItem(as_oj_vsteps);
audioSettings->addItem(st);
//audioSettings->addItem(as_clockrec);
//---------------------------------------------------------
#if HAVE_COOL_HARDWARE
/* only coolstream has SRS stuff, so only compile it there */
@@ -252,12 +249,10 @@ int CAudioSetup::showAudioSetup()
#if 0
audioSettings->addItem(mf);
#endif
if (!g_settings.easymenu) {
audioSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT));
audioSettings->addItem(adj_ac3);
audioSettings->addItem(adj_pcm);
audioSettings->addItem(adj_clear);
}
audioSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT));
audioSettings->addItem(adj_ac3);
audioSettings->addItem(adj_pcm);
audioSettings->addItem(adj_clear);
int res = audioSettings->exec(NULL, "");
selected = audioSettings->getSelected();
@@ -265,8 +260,7 @@ int CAudioSetup::showAudioSetup()
#ifdef BOXMODEL_CS_HD2
delete as_oj_noise;
#endif
if (!g_settings.easymenu)
CZapit::getInstance()->SetVolumePercent(g_settings.audio_volume_percent_ac3, g_settings.audio_volume_percent_pcm);
CZapit::getInstance()->SetVolumePercent(g_settings.audio_volume_percent_ac3, g_settings.audio_volume_percent_pcm);
return res;
}