zapit/audio_setup: add gui option for handling volume adjustment defaults

This commit is contained in:
martii
2013-06-21 10:39:46 +02:00
committed by Jacek Jendrzej
parent d7b496062c
commit 421da2c0cf
10 changed files with 106 additions and 9 deletions

View File

@@ -365,6 +365,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
if (g_settings.start_volume >= 0)
g_settings.current_volume = g_settings.start_volume;
g_settings.audio_volume_percent_ac3 = configfile.getInt32("audio_volume_percent_ac3", 100);
g_settings.audio_volume_percent_pcm = configfile.getInt32("audio_volume_percent_pcm", 100);
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_initial = configfile.getInt32("channel_mode_initial", -1);
@@ -908,6 +911,8 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32( "current_volume", g_settings.current_volume );
configfile.setInt32( "current_volume_step", g_settings.current_volume_step );
configfile.setInt32( "start_volume", g_settings.start_volume );
configfile.setInt32("audio_volume_percent_ac3", g_settings.audio_volume_percent_ac3);
configfile.setInt32("audio_volume_percent_pcm", g_settings.audio_volume_percent_pcm);
configfile.setInt32( "channel_mode", g_settings.channel_mode );
configfile.setInt32( "channel_mode_radio", g_settings.channel_mode_radio );
configfile.setInt32( "channel_mode_initial", g_settings.channel_mode_initial );
@@ -2011,6 +2016,7 @@ TIMER_START();
g_audioMute = CAudioMute::getInstance();
g_audioMute->AudioMute(current_muted, true);
CZapit::getInstance()->SetVolumePercent(g_settings.audio_volume_percent_ac3, g_settings.audio_volume_percent_pcm);
CVFD::getInstance()->showVolume(g_settings.current_volume);
CVFD::getInstance()->setMuted(current_muted);