mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 09:43:51 +02:00
Merge pull request #15269 from sethalves/audio-loopback-button-is-local
case 21932: the test-audio button causes a local audio-loopback rather than a server one
This commit is contained in:
commit
2005293b3f
2 changed files with 4 additions and 4 deletions
|
@ -17,17 +17,17 @@ import stylesUit 1.0
|
||||||
import controlsUit 1.0 as HifiControlsUit
|
import controlsUit 1.0 as HifiControlsUit
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
property bool audioLoopedBack: AudioScriptingInterface.getServerEcho();
|
property bool audioLoopedBack: AudioScriptingInterface.getLocalEcho();
|
||||||
function startAudioLoopback() {
|
function startAudioLoopback() {
|
||||||
if (!audioLoopedBack) {
|
if (!audioLoopedBack) {
|
||||||
audioLoopedBack = true;
|
audioLoopedBack = true;
|
||||||
AudioScriptingInterface.setServerEcho(true);
|
AudioScriptingInterface.setLocalEcho(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function stopAudioLoopback() {
|
function stopAudioLoopback() {
|
||||||
if (audioLoopedBack) {
|
if (audioLoopedBack) {
|
||||||
audioLoopedBack = false;
|
audioLoopedBack = false;
|
||||||
AudioScriptingInterface.setServerEcho(false);
|
AudioScriptingInterface.setLocalEcho(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1052,7 +1052,7 @@ void AudioClient::setReverbOptions(const AudioEffectOptions* options) {
|
||||||
void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) {
|
void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) {
|
||||||
// If there is server echo, reverb will be applied to the recieved audio stream so no need to have it here.
|
// If there is server echo, reverb will be applied to the recieved audio stream so no need to have it here.
|
||||||
bool hasReverb = _reverb || _receivedAudioStream.hasReverb();
|
bool hasReverb = _reverb || _receivedAudioStream.hasReverb();
|
||||||
if (_muted || !_audioOutput || (!_shouldEchoLocally && !hasReverb)) {
|
if ((_muted && !_shouldEchoLocally) || !_audioOutput || (!_shouldEchoLocally && !hasReverb)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue