first callback implemented; overload not working
This commit is contained in:
parent
f21619aa1f
commit
ad53af655b
6 changed files with 92 additions and 29 deletions
|
|
@ -43,10 +43,11 @@ HRESULT EndpointCallback::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) {
|
|||
NGuid* guid = osh->getGuid();
|
||||
|
||||
if (memcmp(guid, &eventData, sizeof(*guid)) == 0) {
|
||||
log_debugcpp("perlitas");
|
||||
log_debugcpp("Onnanokotify says You Shall Not Update Thy Interface.");
|
||||
} else {
|
||||
log_debugcpp("Onnanokotify says Stored: " << guid->data1);
|
||||
log_debugcpp("Onnanokotify says Grace of God: " << eventData.guidEventContext.Data1);
|
||||
osh->updateMuteCallback(this->ep->getIndex(), eventData.bMuted);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
|
@ -123,14 +124,14 @@ void Endpoint::setVolume(int channel, float volume) {
|
|||
}
|
||||
}
|
||||
|
||||
void Endpoint::setMute(NGuid* guid) {
|
||||
BOOL mut;
|
||||
void Endpoint::setMute(NGuid* guid, bool muted) {
|
||||
//BOOL mut;
|
||||
//log_debugcpp("bool mute arrives as " << mut);
|
||||
if(FAILED(endpointVolume->GetMute(&mut))) { log_debugcpp("si"); }
|
||||
log_debugcpp("translate to BOOL as " << mut);
|
||||
//if(FAILED(endpointVolume->GetMute(&mut))) { log_debugcpp("si"); }
|
||||
//log_debugcpp("translate to BOOL as " << mut);
|
||||
//TODO: use new funcs
|
||||
GUID tempMsGuid = NGuidToGUID(guid);
|
||||
if(FAILED(endpointVolume->SetMute((mut == false ? 1 : 0), &tempMsGuid))) { log_debugcpp("si"); };
|
||||
if(FAILED(endpointVolume->SetMute(muted, &tempMsGuid))) { log_debugcpp("si"); };
|
||||
}
|
||||
|
||||
void Endpoint::setCallback(EndpointCallback *epc){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue