back to front now works without hangs?
This commit is contained in:
parent
966cf91a23
commit
d1f0bcaf26
5 changed files with 166 additions and 78 deletions
|
|
@ -36,7 +36,8 @@ void EndpointHandler::setVolume(NGuid* guid, int channel, int value){
|
|||
|
||||
void EndpointHandler::setMute(NGuid* guid, bool muted){
|
||||
//Qt momento, de ahi el param?
|
||||
log_debugcpp("kinda handling the muting tbh");
|
||||
//TODO: mutex test
|
||||
//log_debugcpp("kinda handling the muting tbh");
|
||||
ep->setMute(guid, muted);
|
||||
}
|
||||
|
||||
|
|
@ -108,9 +109,11 @@ void OverseerHandler::setFrontMuteCallback(std::function<void(uint64_t, bool)> f
|
|||
this->updateFrontMuteCallback = f;
|
||||
}
|
||||
|
||||
void OverseerHandler::updateMuteCallback(uint64_t idx, bool muted){
|
||||
updateFrontMuteCallback(idx, muted);
|
||||
}
|
||||
/*
|
||||
* void OverseerHandler::updateMuteCallback(uint64_t idx, bool muted){
|
||||
* updateFrontMuteCallback(idx, muted);
|
||||
* }
|
||||
*/
|
||||
|
||||
/*
|
||||
* void OverseerHandler::updateMainVolumeCallback(uint64_t idx, float newVal){
|
||||
|
|
@ -118,21 +121,32 @@ void OverseerHandler::updateMuteCallback(uint64_t idx, bool muted){
|
|||
* }
|
||||
*/
|
||||
|
||||
void OverseerHandler::updateVolumeCallback(uint64_t idx, uint32_t channel, float newVal){
|
||||
if (channel == (uint32_t)AudioChannel::CHANNEL_MAIN) {
|
||||
log_debugcpp("mainvolcallback float: " << newVal);
|
||||
updateFrontVolumeCallback(idx, AudioChannel::CHANNEL_MAIN, newVal);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// convert channel to bitmask
|
||||
uint32_t i = 0;
|
||||
while (i < channel)
|
||||
i++;
|
||||
uint32_t mask = (1 << i);
|
||||
/*
|
||||
* void OverseerHandler::updateVolumeCallback(uint64_t idx, uint32_t channel, float newVal){
|
||||
* if (channel == (uint32_t)AudioChannel::CHANNEL_MAIN) {
|
||||
* //TODO: mutex test
|
||||
* //log_debugcpp("mainvolcallback float: " << newVal);
|
||||
* updateFrontVolumeCallback(idx, AudioChannel::CHANNEL_MAIN, newVal);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* // convert channel to bitmask
|
||||
* uint32_t i = 0;
|
||||
* while (i < channel)
|
||||
* i++;
|
||||
* uint32_t mask = (1 << i);
|
||||
* //TODO: Mutex test
|
||||
* //log_debugcpp("Back->Cont Channel: " << mask << " volcallback float: " << newVal);
|
||||
*
|
||||
* updateFrontVolumeCallback(idx, mask, newVal);
|
||||
* }
|
||||
*/
|
||||
|
||||
log_debugcpp("Back->Cont Channel: " << mask << " volcallback float: " << newVal);
|
||||
|
||||
updateFrontVolumeCallback(idx, mask, newVal);
|
||||
}
|
||||
/*
|
||||
* void OverseerHandler::receiveBackEndpointCallback(uint64_t index) {
|
||||
* if (memcmp(os.getGuid(), callbackInfo.caller, sizeof(*guid)) != 0)
|
||||
* updateFrontCallback(uint64_t index, &callbackInfo);
|
||||
*
|
||||
* }
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue