wip: setenabled crash to fix

This commit is contained in:
Hane 2023-09-01 21:36:07 +02:00
commit f620a0575d
6 changed files with 111 additions and 17 deletions

View file

@ -125,21 +125,17 @@ HRESULT EndpointSituationCallback::OnDefaultDeviceChanged(EDataFlow flow, ERole
nRole = Roles::ROLE_COMMUNICATIONS;
break;
}
osh
std::wstring wstringEndpointId = pwstrDeviceId;
osh->changeFrontDefaultsCallback(nRole, wstringEndpointId);
return S_OK;
}
HRESULT EndpointSituationCallback::OnDeviceAdded(LPCWSTR pwstrDeviceId) {
printf(" -->Added device\n");
return S_OK;
};
HRESULT EndpointSituationCallback::OnDeviceRemoved(LPCWSTR pwstrDeviceId) {
printf(" -->Removed device\n");
HRESULT EndpointSituationCallback::OnDeviceRemoved(LPCWSTR pwstrDeviceId) {
return S_OK;
}
@ -331,11 +327,15 @@ void Endpoint::setRoles(Roles role){
}
void Endpoint::assignRoles(uint8_t role){
//todo: operador virtuoso
uint8_t roles = endpointRoles | role;
this->endpointRoles = roles;
}
void Endpoint::removeRoles(uint8_t role){
uint8_t roles = endpointRoles ^ role;
this->endpointRoles = roles;
}
Endpoint::~Endpoint(){
log_debugcpp("murio endpoint-san uwu");
properties->Release();