move external volume control to internal volume/mute handler

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
TangoCash
2018-10-19 19:39:36 +02:00
committed by Thilo Graf
parent 2b0b867e2e
commit b35c344c11
3 changed files with 24 additions and 43 deletions

View File

@@ -30,6 +30,7 @@
#endif
#include <global.h>
#include <neutrino.h>
#include <video.h>
#include <driver/display.h>
#include <gui/infoclock.h>
#include <gui/volumebar.h>
@@ -37,6 +38,8 @@
#include <driver/display.h>
#include <system/helpers.h>
CAudioMute::CAudioMute():CComponentsPicture(0, 0, NEUTRINO_ICON_MUTED)
{
y_old = -1;
@@ -61,6 +64,11 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
CVFD::getInstance()->setMuted(newValue);
neutrino->setCurrentMuted(newValue);
#if HAVE_ARM_HARDWARE
if (g_settings.hdmi_cec_volume)
hdmi_cec::getInstance()->toggle_mute();
else
#endif
g_Zapit->muteAudio(newValue);
if( isEvent && ( neutrino->getMode() != NeutrinoModes::mode_scart ) && ( neutrino->getMode() != NeutrinoModes::mode_pic))