broken: fixed event toggling order

This commit is contained in:
Hane 2023-08-14 16:24:07 +02:00
commit 33330419a9
2 changed files with 4 additions and 2 deletions

View file

@ -55,7 +55,7 @@ HRESULT EndpointCallback::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) {
} else { } else {
log_debugcpp("Onnanokotify says Stored: " << guid->data1); log_debugcpp("Onnanokotify says Stored: " << guid->data1);
log_debugcpp("Onnanokotify says Grace of God: " << eventData.guidEventContext.Data1); log_debugcpp("Onnanokotify says Grace of God: " << eventData.guidEventContext.Data1);
osh->toggleFrontEvents(this->ep->getIndex(), false); osh->toggleFrontEvents(this->ep->getIndex(), true);
osh->updateMuteCallback(this->ep->getIndex(), eventData.bMuted); osh->updateMuteCallback(this->ep->getIndex(), eventData.bMuted);
osh->updateMainVolumeCallback(this->ep->getIndex(), eventData.fMasterVolume); osh->updateMainVolumeCallback(this->ep->getIndex(), eventData.fMasterVolume);
log_debugcpp("Onnanokotify says Reported Channel Qty: " << eventData.nChannels); log_debugcpp("Onnanokotify says Reported Channel Qty: " << eventData.nChannels);
@ -66,7 +66,7 @@ HRESULT EndpointCallback::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) {
} }
else else
osh->updateChannelVolumeCallback(this->ep->getIndex(), (uint32_t)0, pNotify->afChannelVolumes[0]); osh->updateChannelVolumeCallback(this->ep->getIndex(), (uint32_t)0, pNotify->afChannelVolumes[0]);
osh->toggleFrontEvents(this->ep->getIndex(), true); osh->toggleFrontEvents(this->ep->getIndex(), false);
} }
return S_OK; return S_OK;

View file

@ -128,10 +128,12 @@ void OverseerHandler::updateMainVolumeCallback(uint64_t idx, float newVal){
void OverseerHandler::updateChannelVolumeCallback(uint64_t idx, uint32_t channel, float newVal){ void OverseerHandler::updateChannelVolumeCallback(uint64_t idx, uint32_t channel, float newVal){
//int translatedNewVal = newVal * 100; //int translatedNewVal = newVal * 100;
log_debugcpp("chanel: " << channel << " volcallback float: " << newVal); log_debugcpp("chanel: " << channel << " volcallback float: " << newVal);
epwChannelVolumeFunc f = &EndpointWidget::updateChannelVolume; epwChannelVolumeFunc f = &EndpointWidget::updateChannelVolume;
std::invoke(f, endpointWidgets.at(idx), channel, newVal); std::invoke(f, endpointWidgets.at(idx), channel, newVal);
//TODO: Soy retrasado //TODO: Soy retrasado
//endpointWidgets.at(idx)->updateChannelVolume(channel, newVal); //endpointWidgets.at(idx)->updateChannelVolume(channel, newVal);
} }