Remove frontend header from contclasses
This commit is contained in:
parent
81f6cb32c8
commit
5bb37eb9fd
5 changed files with 57 additions and 43 deletions
|
|
@ -1,5 +1,4 @@
|
|||
#include "backlasses.h"
|
||||
#include "qtclasses.h"
|
||||
#include "contclasses.h"
|
||||
//TODO: pragma once
|
||||
|
||||
|
|
@ -64,12 +63,6 @@ std::vector<Endpoint*> OverseerHandler::getPlaybackEndpoints() {
|
|||
return this->os.getPlaybackEndpoints();
|
||||
}
|
||||
|
||||
/*
|
||||
* Overseer* OverseerHandler::getOverseer(){
|
||||
* return &os;
|
||||
* }
|
||||
*/
|
||||
|
||||
|
||||
std::vector<EndpointHandler*> OverseerHandler::getEndpointHandlers(){
|
||||
return endpointHandlers;
|
||||
|
|
@ -114,32 +107,29 @@ void OverseerHandler::setEndpointWidgets(std::vector<EndpointWidget*> ews){
|
|||
}
|
||||
|
||||
void OverseerHandler::updateMuteCallback(uint64_t idx, bool muted){
|
||||
epwMuteFunc f = &EndpointWidget::updateMute;
|
||||
pinvoke_mem_fn(endpointWidgets.at(idx),f)(muted);
|
||||
//std::invoke(f, endpointWidgets.at(idx), muted);
|
||||
updateFrontMuteCallback(idx, muted);
|
||||
}
|
||||
|
||||
void OverseerHandler::updateMainVolumeCallback(uint64_t idx, float newVal){
|
||||
//int translatedNewVal = newVal * 100;
|
||||
log_debugcpp("mainvolcallback float: " << newVal);
|
||||
epwMainVolumeFunc f = &EndpointWidget::updateMainVolume;
|
||||
pinvoke_mem_fn(endpointWidgets.at(idx),f)(newVal);
|
||||
//std::invoke(f, endpointWidgets.at(idx), newVal);
|
||||
updateFrontVolumeCallback(idx, AudioChannel::CHANNEL_MAIN, newVal);
|
||||
}
|
||||
|
||||
void OverseerHandler::setFrontVolumeCallback(std::function<void(uint64_t, uint32_t, float)> f) {
|
||||
this->updateFrontVolumeCallback = f;
|
||||
}
|
||||
|
||||
void OverseerHandler::setFrontMuteCallback(std::function<void(uint64_t, bool)> f) {
|
||||
this->updateFrontMuteCallback = f;
|
||||
}
|
||||
|
||||
void OverseerHandler::updateChannelVolumeCallback(uint64_t idx, uint32_t channel, float newVal){
|
||||
//int translatedNewVal = newVal * 100;
|
||||
log_debugcpp("channel: " << channel << " volcallback float: " << newVal);
|
||||
|
||||
log_debugcpp("chanel: " << channel << " volcallback float: " << newVal);
|
||||
epwChannelVolumeFunc f = &EndpointWidget::updateChannelVolume;
|
||||
//std::invoke(f, endpointWidgets.at(idx), channel, newVal);
|
||||
pinvoke_mem_fn(endpointWidgets.at(idx),f)(channel, newVal);
|
||||
//TODO: Soy retrasado
|
||||
//endpointWidgets.at(idx)->updateChannelVolume(channel, newVal);
|
||||
}
|
||||
|
||||
void OverseerHandler::toggleFrontEvents(uint64_t idx, bool active) {
|
||||
epwToggleFrontFunc f = &EndpointWidget::toggleFrontEvents;
|
||||
pinvoke_mem_fn(endpointWidgets.at(idx),f)(active);
|
||||
//std::invoke(f, , active);
|
||||
// convert channel to bitmask
|
||||
int i = 0;
|
||||
while (i++);
|
||||
uint32_t mask = (1 << i);
|
||||
|
||||
updateFrontVolumeCallback(idx, mask, newVal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue