mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
move external volume control to internal volume/mute handler
Origin commit data
------------------
Commit: 0853eb020a
Author: TangoCash <eric@loxat.de>
Date: 2018-10-19 (Fri, 19 Oct 2018)
This commit is contained in:
@@ -1346,7 +1346,8 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32( "hdmi_cec_standby", g_settings.hdmi_cec_standby );
|
||||
configfile.setInt32( "hdmi_cec_volume", g_settings.hdmi_cec_volume );
|
||||
|
||||
configfile.setInt32( "current_volume", g_settings.current_volume );
|
||||
if (!g_settings.hdmi_cec_volume)
|
||||
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);
|
||||
@@ -3034,13 +3035,6 @@ void CNeutrinoApp::RealRun()
|
||||
showInfo();
|
||||
break;
|
||||
case SNeutrinoSettings::VOLUME:
|
||||
#if HAVE_ARM_HARDWARE
|
||||
if (g_settings.hdmi_cec_volume)
|
||||
{
|
||||
(msg == (neutrino_msg_t) g_settings.key_volumeup || msg == CRCInput::RC_right) ? hdmi_cec::getInstance()->vol_up() : hdmi_cec::getInstance()->vol_down();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
g_volume->setVolume(msg);
|
||||
break;
|
||||
default: /* SNeutrinoSettings::ZAP */
|
||||
@@ -3156,13 +3150,6 @@ void CNeutrinoApp::RealRun()
|
||||
showInfo();
|
||||
break;
|
||||
case SNeutrinoSettings::VOLUME:
|
||||
#if HAVE_ARM_HARDWARE
|
||||
if (g_settings.hdmi_cec_volume)
|
||||
{
|
||||
(msg == (neutrino_msg_t) g_settings.key_volumeup || msg == CRCInput::RC_right) ? hdmi_cec::getInstance()->vol_up() : hdmi_cec::getInstance()->vol_down();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
g_volume->setVolume(msg);
|
||||
break;
|
||||
default: /* SNeutrinoSettings::ZAP */
|
||||
@@ -3674,13 +3661,6 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
}
|
||||
else if ((msg == CRCInput::RC_plus) || (msg == CRCInput::RC_minus))
|
||||
{
|
||||
#if HAVE_ARM_HARDWARE
|
||||
if (g_settings.hdmi_cec_volume)
|
||||
{
|
||||
(msg == (neutrino_msg_t) g_settings.key_volumeup || msg == CRCInput::RC_right) ? hdmi_cec::getInstance()->vol_up() : hdmi_cec::getInstance()->vol_down();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
g_volume->setVolume(msg);
|
||||
return messages_return::handled;
|
||||
}
|
||||
@@ -3691,36 +3671,15 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
}
|
||||
else {
|
||||
//mute
|
||||
#if HAVE_ARM_HARDWARE
|
||||
if (g_settings.hdmi_cec_volume)
|
||||
{
|
||||
hdmi_cec::getInstance()->toggle_mute();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
g_audioMute->AudioMute(!current_muted, true);
|
||||
}
|
||||
return messages_return::handled;
|
||||
}
|
||||
else if( msg == CRCInput::RC_mute_on ) {
|
||||
#if HAVE_ARM_HARDWARE
|
||||
if (g_settings.hdmi_cec_volume)
|
||||
{
|
||||
hdmi_cec::getInstance()->toggle_mute();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
g_audioMute->AudioMute(true, true);
|
||||
return messages_return::handled;
|
||||
}
|
||||
else if( msg == CRCInput::RC_mute_off ) {
|
||||
#if HAVE_ARM_HARDWARE
|
||||
if (g_settings.hdmi_cec_volume)
|
||||
{
|
||||
hdmi_cec::getInstance()->toggle_mute();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
g_audioMute->AudioMute(false, true);
|
||||
return messages_return::handled;
|
||||
}
|
||||
|
Reference in New Issue
Block a user