From e87471c39aa859848cf6322d7b43e371bbc49b06 Mon Sep 17 00:00:00 2001 From: zetaPRIME Date: Mon, 21 Mar 2022 23:10:34 -0400 Subject: [PATCH] applying settings stops preview to let new sample rates take --- notes | 2 +- xybrid/settingsdialog.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/notes b/notes index aee4bb0..be1356d 100644 --- a/notes +++ b/notes @@ -82,7 +82,7 @@ TODO { does NOT break preview mode?? 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? } diff --git a/xybrid/settingsdialog.cpp b/xybrid/settingsdialog.cpp index 354c2d9..acb7814 100644 --- a/xybrid/settingsdialog.cpp +++ b/xybrid/settingsdialog.cpp @@ -13,6 +13,9 @@ using namespace Xybrid; #include "config/uiconfig.h" using namespace Xybrid::Config; +#include "audio/audioengine.h" +using namespace Xybrid::Audio; + #include "util/strings.h" SettingsDialog* SettingsDialog::instance = nullptr; @@ -91,6 +94,9 @@ SettingsDialog::~SettingsDialog() { void SettingsDialog::apply() { for (auto& f : binds) f(); FileOps::saveConfig(); + + // if left in preview mode, stop to allow settings to take + if (audioEngine->playbackMode() == audioEngine->Previewing) audioEngine->stop(); } void SettingsDialog::reject() {