Skip to content

Commit

Permalink
DlgPrefSound: fix setting keylock engine from combobox
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Nov 7, 2022
1 parent f96d168 commit e6e7ae7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/engine/enginebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ class EngineBuffer : public EngineObject {
constexpr static std::initializer_list<KeylockEngine> kKeylockEngines = {
KeylockEngine::SoundTouch,
KeylockEngine::RubberBandFaster,
KeylockEngine::RubberBandFiner,
};
KeylockEngine::RubberBandFiner};

EngineBuffer(const QString& group, UserSettingsPointer pConfig,
EngineChannel* pChannel, EngineMaster* pMixingEngine);
Expand Down
6 changes: 4 additions & 2 deletions src/preferences/dialog/dlgprefsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,11 @@ void DlgPrefSound::slotApply() {
SoundDeviceStatus status = SoundDeviceStatus::Ok;
{
ScopedWaitCursor cursor;
m_pKeylockEngine->set(keylockComboBox->currentData().toDouble());
const auto keylockEngine =
keylockComboBox->currentData().value<EngineBuffer::KeylockEngine>();
m_pKeylockEngine->set(static_cast<double>(static_cast<double>(keylockEngine)));
m_pSettings->set(ConfigKey("[Master]", "keylock_engine"),
ConfigValue(keylockComboBox->currentData().toInt()));
ConfigValue(static_cast<int>(keylockEngine)));

status = m_pSoundManager->setConfig(m_config);
}
Expand Down

0 comments on commit e6e7ae7

Please sign in to comment.