phantom header and default role recollection

This commit is contained in:
Hane 2023-08-29 19:00:07 +02:00
commit 5638f2e1f3
10 changed files with 354 additions and 46 deletions

View file

@ -8,9 +8,9 @@ Overseer OverseerHandler::os;
EndpointHandler::EndpointHandler(uint64_t idx) {
//std::vector<Endpoint*> endpoints = osh->getPlaybackEndpoints().at(idx);
this->ep = osh->getPlaybackEndpoints().at(idx);
epc = new EndpointCallback(ep);
epc = new EndpointVolumeCallback(ep);
//epName = ep->getName();
ep->setCallback(epc);
ep->setVolumeCallback(epc);
callbackInfo.muted = this->getMute();
callbackInfo.mainVolume = this->getVolume(AudioChannel::CHANNEL_MAIN);
callbackInfo.channels = this->getChannelCount();
@ -20,7 +20,7 @@ EndpointHandler::EndpointHandler(uint64_t idx) {
}
}
BackEndpointCallbackInfo* EndpointHandler::getCallbackInfo(){
BackEndpointVolumeCallbackInfo* EndpointHandler::getCallbackInfo(){
return &this->callbackInfo;
}
@ -61,8 +61,20 @@ bool EndpointHandler::getMute(){
return ep->getMute();
}
uint8_t EndpointHandler::getState(){
return ep->getState();
}
void EndpointHandler::setState(uint8_t state){
ep->setState(state);
}
uint8_t EndpointHandler::getRoles(){
return ep->getRoles();
}
EndpointHandler::~EndpointHandler() {
ep->removeCallback(epc);
ep->removeVolumeCallback(epc);
epc->Release();
delete ep;
}