mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 14:56:57 +02:00
Fix support for audio when input rate != output rate
This commit is contained in:
parent
f73cd1d65e
commit
9590d2eef9
1 changed files with 7 additions and 5 deletions
|
@ -817,6 +817,13 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) {
|
|||
return;
|
||||
}
|
||||
|
||||
// NOTE: we assume the inputFormat and the outputFormat are the same, since on any modern
|
||||
// multimedia OS they should be. If there is a device that this is not true for, we can
|
||||
// add back support to do resampling.
|
||||
if (_inputFormat.sampleRate() != _outputFormat.sampleRate()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if this person wants local loopback add that to the locally injected audio
|
||||
// if there is reverb apply it to local audio and substract the origin samples
|
||||
|
||||
|
@ -833,11 +840,6 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) {
|
|||
}
|
||||
}
|
||||
|
||||
// NOTE: we assume the inputFormat and the outputFormat are the same, since on any modern
|
||||
// multimedia OS they should be. If there is a device that this is not true for, we can
|
||||
// add back support to do resampling.
|
||||
Q_ASSERT(_inputFormat.sampleRate() == _outputFormat.sampleRate());
|
||||
|
||||
static QByteArray loopBackByteArray;
|
||||
|
||||
int numInputSamples = inputByteArray.size() / AudioConstants::SAMPLE_SIZE;
|
||||
|
|
Loading…
Reference in a new issue