mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
Restored addReverb default arg
This commit is contained in:
parent
fb6fb8a38d
commit
29839df9fe
2 changed files with 4 additions and 4 deletions
|
@ -507,9 +507,9 @@ void Audio::setReverbOptions(const AudioEffectOptions* options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Audio::addReverb(ty_gverb* gverb, int16_t* samplesData, int numSamples, QAudioFormat& audioFormat) {
|
void Audio::addReverb(ty_gverb* gverb, int16_t* samplesData, int numSamples, QAudioFormat& audioFormat, bool noEcho) {
|
||||||
float wetFraction = DB_CO(_reverbOptions->getWetLevel());
|
float wetFraction = DB_CO(_reverbOptions->getWetLevel());
|
||||||
float dryFraction = (!_shouldEchoLocally) ? 0.0f : (1.0f - wetFraction);
|
float dryFraction = (noEcho) ? 0.0f : (1.0f - wetFraction);
|
||||||
|
|
||||||
float lValue,rValue;
|
float lValue,rValue;
|
||||||
for (int sample = 0; sample < numSamples; sample += audioFormat.channelCount()) {
|
for (int sample = 0; sample < numSamples; sample += audioFormat.channelCount()) {
|
||||||
|
@ -568,7 +568,7 @@ void Audio::handleLocalEchoAndReverb(QByteArray& inputByteArray) {
|
||||||
int16_t* loopbackSamples = reinterpret_cast<int16_t*>(loopBackByteArray.data());
|
int16_t* loopbackSamples = reinterpret_cast<int16_t*>(loopBackByteArray.data());
|
||||||
int numLoopbackSamples = loopBackByteArray.size() / sizeof(int16_t);
|
int numLoopbackSamples = loopBackByteArray.size() / sizeof(int16_t);
|
||||||
updateGverbOptions();
|
updateGverbOptions();
|
||||||
addReverb(_gverbLocal, loopbackSamples, numLoopbackSamples, _outputFormat);
|
addReverb(_gverbLocal, loopbackSamples, numLoopbackSamples, _outputFormat, !_shouldEchoLocally);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_loopbackOutputDevice) {
|
if (_loopbackOutputDevice) {
|
||||||
|
|
|
@ -208,7 +208,7 @@ private:
|
||||||
// Adds Reverb
|
// Adds Reverb
|
||||||
void initGverb();
|
void initGverb();
|
||||||
void updateGverbOptions();
|
void updateGverbOptions();
|
||||||
void addReverb(ty_gverb* gverb, int16_t* samples, int numSamples, QAudioFormat& format);
|
void addReverb(ty_gverb* gverb, int16_t* samples, int numSamples, QAudioFormat& format, bool noEcho = false);
|
||||||
|
|
||||||
void handleLocalEchoAndReverb(QByteArray& inputByteArray);
|
void handleLocalEchoAndReverb(QByteArray& inputByteArray);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue