various fixes
This commit is contained in:
parent
5638f2e1f3
commit
512a42f954
9 changed files with 163 additions and 137 deletions
|
|
@ -2,9 +2,6 @@
|
|||
#include "contclasses.h"
|
||||
//TODO: pragma once
|
||||
|
||||
//TODO: ?????
|
||||
Overseer OverseerHandler::os;
|
||||
|
||||
EndpointHandler::EndpointHandler(uint64_t idx) {
|
||||
//std::vector<Endpoint*> endpoints = osh->getPlaybackEndpoints().at(idx);
|
||||
this->ep = osh->getPlaybackEndpoints().at(idx);
|
||||
|
|
@ -39,13 +36,13 @@ uint64_t EndpointHandler::getIndex(){
|
|||
/*
|
||||
* -1 for master volume
|
||||
*/
|
||||
void EndpointHandler::setVolume(NGuid* guid, int channel, int value){
|
||||
void EndpointHandler::setVolume(NGuid guid, int channel, int value){
|
||||
if (channel == AudioChannel::CHANNEL_MAIN)
|
||||
ep->setVolume(guid, channel, (float)value / 100);
|
||||
else ep->setVolume(guid, channel, (float)value / 100);
|
||||
}
|
||||
|
||||
void EndpointHandler::setMute(NGuid* guid, bool muted){
|
||||
void EndpointHandler::setMute(NGuid guid, bool muted){
|
||||
ep->setMute(guid, muted);
|
||||
}
|
||||
|
||||
|
|
@ -79,8 +76,12 @@ EndpointHandler::~EndpointHandler() {
|
|||
delete ep;
|
||||
}
|
||||
|
||||
OverseerHandler::OverseerHandler() {
|
||||
this->os = new Overseer();
|
||||
}
|
||||
|
||||
std::vector<Endpoint*> OverseerHandler::getPlaybackEndpoints() {
|
||||
return this->os.getPlaybackEndpoints();
|
||||
return this->os->getPlaybackEndpoints();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -89,7 +90,7 @@ std::vector<EndpointHandler*> OverseerHandler::getEndpointHandlers(){
|
|||
}
|
||||
|
||||
uint64_t OverseerHandler::getPlaybackEndpointsCount(){
|
||||
return this->os.getPlaybackEndpoints().size();
|
||||
return this->os->getPlaybackEndpoints().size();
|
||||
}
|
||||
|
||||
void OverseerHandler::reloadEndpointHandlers(){
|
||||
|
|
@ -113,8 +114,8 @@ void OverseerHandler::reloadEndpointHandlers(){
|
|||
//setEndpointHandlers(ephs);
|
||||
}
|
||||
|
||||
NGuid* OverseerHandler::getGuid() {
|
||||
return this->os.getGuid();
|
||||
NGuid OverseerHandler::getGuid() {
|
||||
return this->os->getGuid();
|
||||
}
|
||||
|
||||
void OverseerHandler::setEndpointHandlers(std::vector<EndpointHandler*> ephs){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue