applying settings stops preview to let new sample rates take

master
zetaPRIME 2022-03-21 23:10:34 -04:00
parent f430ebab00
commit e87471c39a
2 changed files with 7 additions and 1 deletions

2
notes
View File

@ -82,7 +82,7 @@ TODO {
does NOT break preview mode?? does NOT break preview mode??
seems to be only with the Maybe sample??? idk seems to be only with the Maybe sample??? idk
} }
things can apparently be hooked up cyclically, which completely breaks the queue x things can apparently be hooked up cyclically, which completely breaks the queue
pattern switching is slow when changing (especially increasing) number of rows; set fixed page size to avoid reallocation? pattern switching is slow when changing (especially increasing) number of rows; set fixed page size to avoid reallocation?
} }

View File

@ -13,6 +13,9 @@ using namespace Xybrid;
#include "config/uiconfig.h" #include "config/uiconfig.h"
using namespace Xybrid::Config; using namespace Xybrid::Config;
#include "audio/audioengine.h"
using namespace Xybrid::Audio;
#include "util/strings.h" #include "util/strings.h"
SettingsDialog* SettingsDialog::instance = nullptr; SettingsDialog* SettingsDialog::instance = nullptr;
@ -91,6 +94,9 @@ SettingsDialog::~SettingsDialog() {
void SettingsDialog::apply() { void SettingsDialog::apply() {
for (auto& f : binds) f(); for (auto& f : binds) f();
FileOps::saveConfig(); FileOps::saveConfig();
// if left in preview mode, stop to allow settings to take
if (audioEngine->playbackMode() == audioEngine->Previewing) audioEngine->stop();
} }
void SettingsDialog::reject() { void SettingsDialog::reject() {