broken: play dj outside, get it stuck

This commit is contained in:
Hane 2023-08-14 16:10:35 +02:00
commit e30ed58c08
5 changed files with 58 additions and 12 deletions

View file

@ -73,9 +73,12 @@ EndpointWidget::EndpointWidget(EndpointHandler* eph, QWidget *parent) : QWidget(
void EndpointWidget::updateMute(bool muted){
log_debugcpp("cliqui callboqui cloqui");
//TODO: Here to diagnose slider visuals locking when playing DJ with external volume bar. Functionality is restored when mute checkbox is clicked.
//this->muteButton->blockSignals(true);
this->eph->setMute(osh->getGuid(), muted);
this->muteButton->setChecked(eph->getMute() ? true : false);
this->muteButton->setText(this->eph->getMute() ? STRING_UNMUTE : STRING_MUTE);
this->muteButton->setText(this->eph->getMute() ? STRING_UNMUTE : STRING_MUTE);
//this->muteButton->blockSignals(false);
}
void EndpointWidget::updateMute(int checked){
@ -88,25 +91,42 @@ void EndpointWidget::updateMute(int checked){
}
void EndpointWidget::updateMainVolume(int newValue){
log_debugcpp("updateMainVolume slot");
log_debugcpp("updateMainVolume slot.");
this->eph->setVolume(osh->getGuid(), ENDPOINT_MASTER_VOLUME, newValue);
}
void EndpointWidget::updateMainVolume(float newValue){
int newVal = newValue * 100;
log_debugcpp("mainvolcallback int: " << newVal);
//this->mainSlider->blockSignals(true);
//TODO: Above
if(this->mainSlider->value() != newVal) {
this->mainSlider->setValue(newVal);
}
//this->mainSlider->blockSignals(false);
}
void EndpointWidget::updateChannelVolume(uint32_t channel, float newValue){
int newVal = newValue * 100;
log_debugcpp("chanel: " << channel << " volcallback int: " << newVal);
//TODO: Above
//this->channelSliders.at(channel)->blockSignals(true);
if(this->channelSliders.at(channel)->value() != newVal) {
this->channelSliders.at(channel)->setValue(newVal);
this->channelLabels.at(channel)->setText(QString::number((int)(newValue * 100)));
}
//this->channelSliders.at(channel)->blockSignals(false);
}
void EndpointWidget::toggleFrontEvents(bool active){
this->muteButton->blockSignals(active);
this->mainSlider->blockSignals(active);
for(uint32_t i = 0; i < this->channelSliders.size(); i++){
this->channelSliders.at(i)->blockSignals(active);
}
}
void EndpointWidget::setIndex(uint64_t idx){
this->idx = idx;
}