fix source/samplerate selection bugs

This commit is contained in:
AlexandreRouma
2024-05-26 22:27:47 +02:00
parent ea0362b927
commit a93bb9d468
9 changed files with 18 additions and 18 deletions

View File

@ -152,7 +152,6 @@ public:
// Update samplerate from ID
sampleRate = sampleRates[srId];
core::setInputSampleRate(sampleRate);
}
private:
@ -232,6 +231,7 @@ private:
if (SmGui::Combo(CONCAT("##_audio_dev_sel_", _this->name), &_this->devId, _this->devices.txt)) {
std::string dev = _this->devices.key(_this->devId);
_this->select(dev);
core::setInputSampleRate(_this->sampleRate);
config.acquire();
config.conf["device"] = dev;
config.release(true);
@ -253,6 +253,7 @@ private:
if (SmGui::Button(CONCAT("Refresh##_audio_refr_", _this->name))) {
_this->refresh();
_this->select(_this->selectedDevice);
core::setInputSampleRate(_this->sampleRate);
}
if (_this->running) { SmGui::EndDisabled(); }