mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
gui/audio_setup.cpp: add option to set static volume on boot
This commit is contained in:
@@ -128,6 +128,7 @@ audiomenu.pref_subs_head Subtitle language preferences
|
|||||||
audiomenu.spdif_dd Encoded DD on SPDIF
|
audiomenu.spdif_dd Encoded DD on SPDIF
|
||||||
audiomenu.stereo stereo
|
audiomenu.stereo stereo
|
||||||
audiomenu.volume_adjust Volume adjustment, in %
|
audiomenu.volume_adjust Volume adjustment, in %
|
||||||
|
audiomenu.volume_start Start volume
|
||||||
audiomenu.volume_step Volume step
|
audiomenu.volume_step Volume step
|
||||||
audioplayer.add Add
|
audioplayer.add Add
|
||||||
audioplayer.add_ic Icecast
|
audioplayer.add_ic Icecast
|
||||||
@@ -807,6 +808,7 @@ menu.hint_audio_srs_algo Amount of control, light or normal
|
|||||||
menu.hint_audio_srs_nmgr Noise manager
|
menu.hint_audio_srs_nmgr Noise manager
|
||||||
menu.hint_audio_srs_volume Reference level to maintain
|
menu.hint_audio_srs_volume Reference level to maintain
|
||||||
menu.hint_audio_volstep Volume +/- keys increase/decrease step
|
menu.hint_audio_volstep Volume +/- keys increase/decrease step
|
||||||
|
menu.hint_audio_volstart Always set selected volume value on boot
|
||||||
menu.hint_audioplayer_defdir Default audioplayer directory
|
menu.hint_audioplayer_defdir Default audioplayer directory
|
||||||
menu.hint_audioplayer_follow Move playlist selected pointer\nto current playing song
|
menu.hint_audioplayer_follow Move playlist selected pointer\nto current playing song
|
||||||
menu.hint_audioplayer_highprio Increase playback priority
|
menu.hint_audioplayer_highprio Increase playback priority
|
||||||
|
@@ -150,6 +150,7 @@ int CAudioSetup::showAudioSetup()
|
|||||||
|
|
||||||
CMenuOptionChooser * as_oj_avsync = NULL;
|
CMenuOptionChooser * as_oj_avsync = NULL;
|
||||||
CMenuOptionNumberChooser * as_oj_vsteps = NULL;
|
CMenuOptionNumberChooser * as_oj_vsteps = NULL;
|
||||||
|
CMenuOptionNumberChooser * st = NULL;
|
||||||
if (!g_settings.easymenu) {
|
if (!g_settings.easymenu) {
|
||||||
//av synch
|
//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 = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVSYNC, &g_settings.avsync, AUDIOMENU_AVSYNC_OPTIONS, AUDIOMENU_AVSYNC_OPTION_COUNT, true, audioSetupNotifier);
|
||||||
@@ -158,6 +159,9 @@ int CAudioSetup::showAudioSetup()
|
|||||||
//volume steps
|
//volume steps
|
||||||
as_oj_vsteps = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_STEP, (int *)&g_settings.current_volume_step, true, 1, 25, NULL);
|
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);
|
as_oj_vsteps->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTEP);
|
||||||
|
|
||||||
|
st = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_START, &g_settings.start_volume, true, -1, 100, NULL, 0, -1, LOCALE_OPTIONS_OFF);
|
||||||
|
st->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTART);
|
||||||
//clock rec
|
//clock rec
|
||||||
//CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier);
|
//CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier);
|
||||||
}
|
}
|
||||||
@@ -194,6 +198,7 @@ int CAudioSetup::showAudioSetup()
|
|||||||
audioSettings->addItem(GenericMenuSeparatorLine);
|
audioSettings->addItem(GenericMenuSeparatorLine);
|
||||||
audioSettings->addItem(as_oj_avsync);
|
audioSettings->addItem(as_oj_avsync);
|
||||||
audioSettings->addItem(as_oj_vsteps);
|
audioSettings->addItem(as_oj_vsteps);
|
||||||
|
audioSettings->addItem(st);
|
||||||
//audioSettings->addItem(as_clockrec);
|
//audioSettings->addItem(as_clockrec);
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
@@ -335,6 +335,10 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
g_settings.video_43mode = configfile.getInt32("video_43mode", DISPLAY_AR_MODE_LETTERBOX);
|
g_settings.video_43mode = configfile.getInt32("video_43mode", DISPLAY_AR_MODE_LETTERBOX);
|
||||||
g_settings.current_volume = configfile.getInt32("current_volume", 50);
|
g_settings.current_volume = configfile.getInt32("current_volume", 50);
|
||||||
g_settings.current_volume_step = configfile.getInt32("current_volume_step", 2);
|
g_settings.current_volume_step = configfile.getInt32("current_volume_step", 2);
|
||||||
|
g_settings.start_volume = configfile.getInt32("start_volume", -1);
|
||||||
|
if (g_settings.start_volume >= 0)
|
||||||
|
g_settings.current_volume = g_settings.start_volume;
|
||||||
|
|
||||||
g_settings.channel_mode = configfile.getInt32("channel_mode", LIST_MODE_PROV);
|
g_settings.channel_mode = configfile.getInt32("channel_mode", LIST_MODE_PROV);
|
||||||
g_settings.channel_mode_radio = configfile.getInt32("channel_mode_radio", LIST_MODE_PROV);
|
g_settings.channel_mode_radio = configfile.getInt32("channel_mode_radio", LIST_MODE_PROV);
|
||||||
g_settings.channel_mode_initial = configfile.getInt32("channel_mode_initial", -1);
|
g_settings.channel_mode_initial = configfile.getInt32("channel_mode_initial", -1);
|
||||||
@@ -885,6 +889,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
|||||||
|
|
||||||
configfile.setInt32( "current_volume", g_settings.current_volume );
|
configfile.setInt32( "current_volume", g_settings.current_volume );
|
||||||
configfile.setInt32( "current_volume_step", g_settings.current_volume_step );
|
configfile.setInt32( "current_volume_step", g_settings.current_volume_step );
|
||||||
|
configfile.setInt32( "start_volume", g_settings.start_volume );
|
||||||
configfile.setInt32( "channel_mode", g_settings.channel_mode );
|
configfile.setInt32( "channel_mode", g_settings.channel_mode );
|
||||||
configfile.setInt32( "channel_mode_radio", g_settings.channel_mode_radio );
|
configfile.setInt32( "channel_mode_radio", g_settings.channel_mode_radio );
|
||||||
configfile.setInt32( "channel_mode_initial", g_settings.channel_mode_initial );
|
configfile.setInt32( "channel_mode_initial", g_settings.channel_mode_initial );
|
||||||
@@ -1955,9 +1960,6 @@ TIMER_START();
|
|||||||
CEitManager::getInstance()->Start();
|
CEitManager::getInstance()->Start();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
|
||||||
CVFD::getInstance()->setMuted(current_muted);
|
|
||||||
|
|
||||||
g_RemoteControl = new CRemoteControl;
|
g_RemoteControl = new CRemoteControl;
|
||||||
g_EpgData = new CEpgData;
|
g_EpgData = new CEpgData;
|
||||||
g_InfoViewer = new CInfoViewer;
|
g_InfoViewer = new CInfoViewer;
|
||||||
@@ -1992,9 +1994,17 @@ TIMER_START();
|
|||||||
|
|
||||||
InitTimerdClient();
|
InitTimerdClient();
|
||||||
|
|
||||||
|
// volume
|
||||||
|
if (g_settings.show_mute_icon && g_settings.current_volume == 0)
|
||||||
|
current_muted = true;
|
||||||
|
|
||||||
g_volume = CVolume::getInstance();
|
g_volume = CVolume::getInstance();
|
||||||
g_audioMute = CAudioMute::getInstance();
|
g_audioMute = CAudioMute::getInstance();
|
||||||
|
|
||||||
|
g_audioMute->AudioMute(current_muted, true);
|
||||||
|
CVFD::getInstance()->showVolume(g_settings.current_volume);
|
||||||
|
CVFD::getInstance()->setMuted(current_muted);
|
||||||
|
|
||||||
if (show_startwizard) {
|
if (show_startwizard) {
|
||||||
hintBox->hide();
|
hintBox->hide();
|
||||||
CStartUpWizard startwizard;
|
CStartUpWizard startwizard;
|
||||||
@@ -2017,7 +2027,6 @@ TIMER_START();
|
|||||||
cCA::GetInstance()->Ready(true);
|
cCA::GetInstance()->Ready(true);
|
||||||
InitZapper();
|
InitZapper();
|
||||||
|
|
||||||
g_audioMute->AudioMute(current_muted, true);
|
|
||||||
SHTDCNT::getInstance()->init();
|
SHTDCNT::getInstance()->init();
|
||||||
|
|
||||||
hintBox->hide();
|
hintBox->hide();
|
||||||
|
@@ -155,6 +155,7 @@ typedef enum
|
|||||||
LOCALE_AUDIOMENU_SPDIF_DD,
|
LOCALE_AUDIOMENU_SPDIF_DD,
|
||||||
LOCALE_AUDIOMENU_STEREO,
|
LOCALE_AUDIOMENU_STEREO,
|
||||||
LOCALE_AUDIOMENU_VOLUME_ADJUST,
|
LOCALE_AUDIOMENU_VOLUME_ADJUST,
|
||||||
|
LOCALE_AUDIOMENU_VOLUME_START,
|
||||||
LOCALE_AUDIOMENU_VOLUME_STEP,
|
LOCALE_AUDIOMENU_VOLUME_STEP,
|
||||||
LOCALE_AUDIOPLAYER_ADD,
|
LOCALE_AUDIOPLAYER_ADD,
|
||||||
LOCALE_AUDIOPLAYER_ADD_IC,
|
LOCALE_AUDIOPLAYER_ADD_IC,
|
||||||
@@ -833,6 +834,7 @@ typedef enum
|
|||||||
LOCALE_MENU_HINT_AUDIO_SRS_ALGO,
|
LOCALE_MENU_HINT_AUDIO_SRS_ALGO,
|
||||||
LOCALE_MENU_HINT_AUDIO_SRS_NMGR,
|
LOCALE_MENU_HINT_AUDIO_SRS_NMGR,
|
||||||
LOCALE_MENU_HINT_AUDIO_SRS_VOLUME,
|
LOCALE_MENU_HINT_AUDIO_SRS_VOLUME,
|
||||||
|
LOCALE_MENU_HINT_AUDIO_VOLSTART,
|
||||||
LOCALE_MENU_HINT_AUDIO_VOLSTEP,
|
LOCALE_MENU_HINT_AUDIO_VOLSTEP,
|
||||||
LOCALE_MENU_HINT_AUDIOPLAYER_DEFDIR,
|
LOCALE_MENU_HINT_AUDIOPLAYER_DEFDIR,
|
||||||
LOCALE_MENU_HINT_AUDIOPLAYER_FOLLOW,
|
LOCALE_MENU_HINT_AUDIOPLAYER_FOLLOW,
|
||||||
|
@@ -155,6 +155,7 @@ const char * locale_real_names[] =
|
|||||||
"audiomenu.spdif_dd",
|
"audiomenu.spdif_dd",
|
||||||
"audiomenu.stereo",
|
"audiomenu.stereo",
|
||||||
"audiomenu.volume_adjust",
|
"audiomenu.volume_adjust",
|
||||||
|
"audiomenu.volume_start",
|
||||||
"audiomenu.volume_step",
|
"audiomenu.volume_step",
|
||||||
"audioplayer.add",
|
"audioplayer.add",
|
||||||
"audioplayer.add_ic",
|
"audioplayer.add_ic",
|
||||||
@@ -833,6 +834,7 @@ const char * locale_real_names[] =
|
|||||||
"menu.hint_audio_srs_algo",
|
"menu.hint_audio_srs_algo",
|
||||||
"menu.hint_audio_srs_nmgr",
|
"menu.hint_audio_srs_nmgr",
|
||||||
"menu.hint_audio_srs_volume",
|
"menu.hint_audio_srs_volume",
|
||||||
|
"menu.hint_audio_volstart",
|
||||||
"menu.hint_audio_volstep",
|
"menu.hint_audio_volstep",
|
||||||
"menu.hint_audioplayer_defdir",
|
"menu.hint_audioplayer_defdir",
|
||||||
"menu.hint_audioplayer_follow",
|
"menu.hint_audioplayer_follow",
|
||||||
|
@@ -63,6 +63,7 @@ struct SNeutrinoSettings
|
|||||||
#endif
|
#endif
|
||||||
char current_volume;
|
char current_volume;
|
||||||
int current_volume_step;
|
int current_volume_step;
|
||||||
|
int start_volume;
|
||||||
int channel_mode;
|
int channel_mode;
|
||||||
int channel_mode_radio;
|
int channel_mode_radio;
|
||||||
int channel_mode_initial;
|
int channel_mode_initial;
|
||||||
|
Reference in New Issue
Block a user