mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into toulouse
This commit is contained in:
commit
3a053c32f4
4 changed files with 23 additions and 10 deletions
|
@ -32,6 +32,7 @@ AvatarInputs* AvatarInputs::getInstance() {
|
||||||
|
|
||||||
AvatarInputs::AvatarInputs(QObject* parent) : QObject(parent) {
|
AvatarInputs::AvatarInputs(QObject* parent) : QObject(parent) {
|
||||||
_showAudioTools = showAudioToolsSetting.get();
|
_showAudioTools = showAudioToolsSetting.get();
|
||||||
|
_showBubbleTools = showBubbleToolsSetting.get();
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
auto usersScriptingInterface = DependencyManager::get<UsersScriptingInterface>();
|
auto usersScriptingInterface = DependencyManager::get<UsersScriptingInterface>();
|
||||||
connect(nodeList.data(), &NodeList::ignoreRadiusEnabledChanged, this, &AvatarInputs::ignoreRadiusEnabledChanged);
|
connect(nodeList.data(), &NodeList::ignoreRadiusEnabledChanged, this, &AvatarInputs::ignoreRadiusEnabledChanged);
|
||||||
|
|
|
@ -194,8 +194,8 @@ private:
|
||||||
void onAvatarEnteredIgnoreRadius();
|
void onAvatarEnteredIgnoreRadius();
|
||||||
void onAvatarLeftIgnoreRadius();
|
void onAvatarLeftIgnoreRadius();
|
||||||
float _trailingAudioLoudness{ 0 };
|
float _trailingAudioLoudness{ 0 };
|
||||||
bool _showAudioTools { false };
|
bool _showAudioTools { true };
|
||||||
bool _showBubbleTools{ false };
|
bool _showBubbleTools{ true };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AvatarInputs_h
|
#endif // hifi_AvatarInputs_h
|
||||||
|
|
|
@ -597,11 +597,17 @@ bool AudioClient::getNamedAudioDeviceForModeExists(QAudio::Mode mode, const QStr
|
||||||
|
|
||||||
|
|
||||||
// attempt to use the native sample rate and channel count
|
// attempt to use the native sample rate and channel count
|
||||||
bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice, QAudioFormat& audioFormat) {
|
||||||
QAudioFormat& audioFormat) {
|
|
||||||
|
|
||||||
audioFormat = audioDevice.preferredFormat();
|
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.setCodec("audio/pcm");
|
||||||
audioFormat.setSampleSize(16);
|
audioFormat.setSampleSize(16);
|
||||||
audioFormat.setSampleType(QAudioFormat::SignedInt);
|
audioFormat.setSampleType(QAudioFormat::SignedInt);
|
||||||
|
@ -609,12 +615,17 @@ bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
||||||
|
|
||||||
if (!audioDevice.isFormatSupported(audioFormat)) {
|
if (!audioDevice.isFormatSupported(audioFormat)) {
|
||||||
qCWarning(audioclient) << "The native format is" << audioFormat << "but isFormatSupported() failed.";
|
qCWarning(audioclient) << "The native format is" << audioFormat << "but isFormatSupported() failed.";
|
||||||
return false;
|
|
||||||
}
|
// attempt the native sample rate, with channels forced to 2
|
||||||
// converting to/from this rate must produce an integral number of samples
|
audioFormat.setChannelCount(2);
|
||||||
if (audioFormat.sampleRate() * AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL % AudioConstants::SAMPLE_RATE != 0) {
|
if (!audioDevice.isFormatSupported(audioFormat)) {
|
||||||
qCWarning(audioclient) << "The native sample rate [" << audioFormat.sampleRate() << "] is not supported.";
|
|
||||||
return false;
|
// attempt the native sample rate, with channels forced to 1
|
||||||
|
audioFormat.setChannelCount(1);
|
||||||
|
if (!audioDevice.isFormatSupported(audioFormat)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,6 +352,7 @@ void ScriptEngines::saveScripts() {
|
||||||
// the scripts that the user expects to be there when launched without the
|
// the scripts that the user expects to be there when launched without the
|
||||||
// --scripts override.
|
// --scripts override.
|
||||||
if (_defaultScriptsLocationOverridden) {
|
if (_defaultScriptsLocationOverridden) {
|
||||||
|
runningScriptsHandle.set(QVariantList{ DEFAULT_SCRIPTS_LOCATION });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue