mute city boton momento

This commit is contained in:
Hane 2023-02-16 20:34:54 +01:00
commit e42c2dd6c9
7 changed files with 50 additions and 7 deletions

View file

@ -26,6 +26,15 @@ float Endpoint::getVolume(int channel){
}
bool Endpoint::getMute(){
BOOL mut;
if(FAILED(endpointVolume->GetMute(&mut))) { log_debugcpp("si"); }
log_debugcpp("back BOOL is " << mut);
bool mute = (bool)mut;
log_debugcpp("translate to bool " << mute);
return mute;
}
/*
* float Endpoint::getLeftChannelVolume(){
* float volume;
@ -49,6 +58,15 @@ void Endpoint::setVolume(int channel, float volume) {
}
}
void Endpoint::setMute() {
log_debugcpp("bool mute arrives as " << mut);
BOOL mut;
if(FAILED(endpointVolume->GetMute(&mut))) { log_debugcpp("si"); }
log_debugcpp("translate to BOOL as " << mute);
if(FAILED(endpointVolume->SetMute((mut == false ? 1 : 0), NULL))) { log_debugcpp("si"); };
}
Endpoint::~Endpoint(){
log_debugcpp("cum");
free(friendlyName);