polling data source vector'd and moved to eph

This commit is contained in:
Hane 2023-08-22 18:28:09 +02:00
commit 8c1cea2da9
4 changed files with 41 additions and 53 deletions

View file

@ -11,6 +11,17 @@ EndpointHandler::EndpointHandler(uint64_t idx) {
epc = new EndpointCallback(ep);
//epName = ep->getName();
ep->setCallback(epc);
callbackInfo.muted = this->getMute();
callbackInfo.mainVolume = this->getVolume(AudioChannel::CHANNEL_MAIN);
callbackInfo.channels = this->getChannelCount();
callbackInfo.channelVolumes.resize(this->callbackInfo.channels);
for(uint32_t i = 0; i < this->getChannelCount(); i++){
callbackInfo.channelVolumes[i] = this->getVolume(i);
}
}
BackEndpointCallbackInfo* EndpointHandler::getCallbackInfo(){
return &this->callbackInfo;
}
uint32_t EndpointHandler::getChannelCount(){