diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a480af2e0e..83e1f622fd 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3601,13 +3601,14 @@ void Application::keyPressEvent(QKeyEvent* event) { AudioInjectorOptions options; options.localOnly = true; options.stereo = true; - - if (_snapshotSoundInjector) { - _snapshotSoundInjector->setOptions(options); - _snapshotSoundInjector->restart(); - } else { - QByteArray samples = _snapshotSound->getByteArray(); - _snapshotSoundInjector = AudioInjector::playSound(samples, options); + if (SettingsScriptingInterface::getInstance()->getValue(MenuOption::NotificationSoundsSnapshot).toBool()) { + if (_snapshotSoundInjector) { + _snapshotSoundInjector->setOptions(options); + _snapshotSoundInjector->restart(); + } else { + QByteArray samples = _snapshotSound->getByteArray(); + _snapshotSoundInjector = AudioInjector::playSound(samples, options); + } } takeSnapshot(true); break; diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 653800a1ab..676e4f25e9 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -282,9 +282,9 @@ Menu::Menu() { // Settings > Notifications > Snapshot action = addCheckableActionToQMenuAndActionHash(notificationsMenu, "Snapshot", 0, - settings->getValue("play_notification_sounds_type_0").toBool()); + settings->getValue(MenuOption::NotificationSoundsSnapshot).toBool()); connect(action, &QAction::triggered, [action, settings] { - settings->setValue("play_notification_sounds_type_0", action->isChecked()); + settings->setValue(MenuOption::NotificationSoundsSnapshot, action->isChecked()); }); // Settings > Notifications > Level of Detail action = addCheckableActionToQMenuAndActionHash(notificationsMenu, "Level of Detail", 0, diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 3a4864cfc6..5917aab38b 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -212,6 +212,7 @@ namespace MenuOption { const QString HMDTabletToToolbar = "HMD Tablet Becomes Toolbar"; const QString Shadows = "Shadows"; const QString AmbientOcclusion = "Ambient Occlusion"; + const QString NotificationSoundsSnapshot = "play_notification_sounds_snapshot"; } #endif // hifi_Menu_h