slight code cleanup

This commit is contained in:
Hane 2024-04-09 22:03:53 +02:00
commit b3c663046f
3 changed files with 26 additions and 58 deletions

View file

@ -140,12 +140,6 @@ HRESULT EndpointVolumeCallback::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify
* }
*
*/
//todo: not on construct since it expects them to already exist; smells like refactor!
void EndpointSituationCallback::fill(IMMDeviceEnumerator *deviceEnumerator, std::vector<Endpoint*> playbackDevices, std::vector<Endpoint*> captureDevices){
this->deviceEnumerator = deviceEnumerator;
this->playbackDevices = playbackDevices;
this->captureDevices = captureDevices;
}
ULONG EndpointSituationCallback::AddRef(){
return InterlockedIncrement(&ref);
@ -685,7 +679,8 @@ Overseer::Overseer() { //: epsc(deviceEnumerator, playbackDevices){
//reloadEndpoints(Flows::FLOW_CAPTURE);
//Registering for endpoint information callback
this->epsc.fill(deviceEnumerator, playbackDevices, captureDevices);
//this->epsc.fill(deviceEnumerator, playbackDevices, captureDevices);
//this->epsc.fill(deviceEnumerator);
if(FAILED(deviceEnumerator->RegisterEndpointNotificationCallback(((IMMNotificationClient*)&epsc)))) { log_debugcpp("when no enchufas......"); }
}