code cleanup; channels callback coalesced again
This commit is contained in:
parent
c4b1c4b796
commit
831dceb89a
6 changed files with 58 additions and 55 deletions
|
|
@ -56,15 +56,15 @@ HRESULT EndpointCallback::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) {
|
|||
log_debugcpp("Onnanokotify says Stored: " << guid->data1);
|
||||
log_debugcpp("Onnanokotify says Grace of God: " << eventData.guidEventContext.Data1);
|
||||
osh->updateMuteCallback(this->ep->getIndex(), eventData.bMuted);
|
||||
osh->updateMainVolumeCallback(this->ep->getIndex(), eventData.fMasterVolume);
|
||||
osh->updateVolumeCallback(this->ep->getIndex(), AudioChannel::CHANNEL_MAIN ,eventData.fMasterVolume);
|
||||
log_debugcpp("Onnanokotify says Reported Channel Qty: " << eventData.nChannels);
|
||||
|
||||
if(multiChannel)
|
||||
for(UINT i = 0; i < eventData.nChannels; i++) {
|
||||
osh->updateChannelVolumeCallback(this->ep->getIndex(), (uint32_t)i, extraChannelVol[i]);
|
||||
osh->updateVolumeCallback(this->ep->getIndex(), (uint32_t)i, extraChannelVol[i]);
|
||||
}
|
||||
else
|
||||
osh->updateChannelVolumeCallback(this->ep->getIndex(), (uint32_t)0, pNotify->afChannelVolumes[0]);
|
||||
osh->updateVolumeCallback(this->ep->getIndex(), (uint32_t)0, pNotify->afChannelVolumes[0]);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue