From a37ef7d80ea1f22e4cb7f01e7a883040b631747a Mon Sep 17 00:00:00 2001 From: amerhifi Date: Fri, 2 Aug 2019 13:00:43 -0700 Subject: [PATCH 1/3] adding default script location setting for defaultscriptoverride runs. Prevents the second interface run to have no ui --- libraries/script-engine/src/ScriptEngines.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/script-engine/src/ScriptEngines.cpp b/libraries/script-engine/src/ScriptEngines.cpp index 381377c9f4..69455294d6 100644 --- a/libraries/script-engine/src/ScriptEngines.cpp +++ b/libraries/script-engine/src/ScriptEngines.cpp @@ -352,6 +352,7 @@ void ScriptEngines::saveScripts() { // the scripts that the user expects to be there when launched without the // --scripts override. if (_defaultScriptsLocationOverridden) { + runningScriptsHandle.set(QVariantList{ DEFAULT_SCRIPTS_LOCATION }); return; } From 34bc71fba95b8ebaa51c896ab80930717d33f1fc Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 5 Aug 2019 15:12:29 -0400 Subject: [PATCH 2/3] Fix BUGZ-1131: Add Shield icon back to HUD for Metaverse users --- interface/src/ui/AvatarInputs.cpp | 1 + interface/src/ui/AvatarInputs.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/ui/AvatarInputs.cpp b/interface/src/ui/AvatarInputs.cpp index b9a1fc441f..a6bc7cf84f 100644 --- a/interface/src/ui/AvatarInputs.cpp +++ b/interface/src/ui/AvatarInputs.cpp @@ -32,6 +32,7 @@ AvatarInputs* AvatarInputs::getInstance() { AvatarInputs::AvatarInputs(QObject* parent) : QObject(parent) { _showAudioTools = showAudioToolsSetting.get(); + _showBubbleTools = showBubbleToolsSetting.get(); auto nodeList = DependencyManager::get(); auto usersScriptingInterface = DependencyManager::get(); connect(nodeList.data(), &NodeList::ignoreRadiusEnabledChanged, this, &AvatarInputs::ignoreRadiusEnabledChanged); diff --git a/interface/src/ui/AvatarInputs.h b/interface/src/ui/AvatarInputs.h index 9e7d231dd2..dca39fd433 100644 --- a/interface/src/ui/AvatarInputs.h +++ b/interface/src/ui/AvatarInputs.h @@ -194,8 +194,8 @@ private: void onAvatarEnteredIgnoreRadius(); void onAvatarLeftIgnoreRadius(); float _trailingAudioLoudness{ 0 }; - bool _showAudioTools { false }; - bool _showBubbleTools{ false }; + bool _showAudioTools { true }; + bool _showBubbleTools{ true }; }; #endif // hifi_AvatarInputs_h From 86adc6099b4ed8b6791666fe16be96d7d8f7123a Mon Sep 17 00:00:00 2001 From: Ken Cooke Date: Mon, 5 Aug 2019 12:14:45 -0700 Subject: [PATCH 3/3] Attempt audio device format with native sample rate and channels forced to 2/1 before failing --- libraries/audio-client/src/AudioClient.cpp | 27 +++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index c16e297c28..09b8b495f3 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -597,11 +597,17 @@ bool AudioClient::getNamedAudioDeviceForModeExists(QAudio::Mode mode, const QStr // attempt to use the native sample rate and channel count -bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice, - QAudioFormat& audioFormat) { +bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice, QAudioFormat& audioFormat) { audioFormat = audioDevice.preferredFormat(); + // converting to/from this rate must produce an integral number of samples + if ((audioFormat.sampleRate() <= 0) || + (audioFormat.sampleRate() * AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL % AudioConstants::SAMPLE_RATE != 0)) { + qCWarning(audioclient) << "The native sample rate [" << audioFormat.sampleRate() << "] is not supported."; + return false; + } + audioFormat.setCodec("audio/pcm"); audioFormat.setSampleSize(16); audioFormat.setSampleType(QAudioFormat::SignedInt); @@ -609,12 +615,17 @@ bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice, if (!audioDevice.isFormatSupported(audioFormat)) { qCWarning(audioclient) << "The native format is" << audioFormat << "but isFormatSupported() failed."; - return false; - } - // converting to/from this rate must produce an integral number of samples - if (audioFormat.sampleRate() * AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL % AudioConstants::SAMPLE_RATE != 0) { - qCWarning(audioclient) << "The native sample rate [" << audioFormat.sampleRate() << "] is not supported."; - return false; + + // attempt the native sample rate, with channels forced to 2 + audioFormat.setChannelCount(2); + if (!audioDevice.isFormatSupported(audioFormat)) { + + // attempt the native sample rate, with channels forced to 1 + audioFormat.setChannelCount(1); + if (!audioDevice.isFormatSupported(audioFormat)) { + return false; + } + } } return true; }