mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 18:10:37 +02:00
grab reverb settings on mixer side
This commit is contained in:
parent
ea7c2e2fa3
commit
26b1e8fc29
2 changed files with 40 additions and 1 deletions
|
@ -1033,6 +1033,39 @@ void AudioMixer::parseSettingsObject(const QJsonObject &settingsObject) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString REVERB = "reverb";
|
||||||
|
if (audioEnvGroupObject[REVERB].isArray()) {
|
||||||
|
const QJsonArray& reverb = audioEnvGroupObject[REVERB].toArray();
|
||||||
|
|
||||||
|
const QString ZONE = "zone";
|
||||||
|
const QString REVERB_TIME = "reverb_time";
|
||||||
|
const QString WET_LEVEL = "wet_level";
|
||||||
|
for (int i = 0; i < reverb.count(); ++i) {
|
||||||
|
QJsonObject reverbObject = reverb[i].toObject();
|
||||||
|
|
||||||
|
if (reverbObject.contains(ZONE) &&
|
||||||
|
reverbObject.contains(REVERB_TIME) &&
|
||||||
|
reverbObject.contains(WET_LEVEL)) {
|
||||||
|
|
||||||
|
bool okReverbTime, okWetLevel;
|
||||||
|
QString zone = reverbObject.value(ZONE).toString();
|
||||||
|
float reverbTime = reverbObject.value(REVERB_TIME).toString().toFloat(&okReverbTime);
|
||||||
|
float wetLevel = reverbObject.value(WET_LEVEL).toString().toFloat(&okWetLevel);
|
||||||
|
|
||||||
|
if (okReverbTime && okWetLevel && _audioZones.contains(zone)) {
|
||||||
|
|
||||||
|
ReverbSettings settings;
|
||||||
|
settings.zone = zone;
|
||||||
|
settings.reverbTime = reverbTime;
|
||||||
|
settings.wetLevel = wetLevel;
|
||||||
|
|
||||||
|
_zoneReverbSettings.push_back(settings);
|
||||||
|
qDebug() << "Added Reverb:" << zone << reverbTime << wetLevel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,12 @@ private:
|
||||||
float coefficient;
|
float coefficient;
|
||||||
};
|
};
|
||||||
QVector<ZonesSettings> _zonesSettings;
|
QVector<ZonesSettings> _zonesSettings;
|
||||||
|
struct ReverbSettings {
|
||||||
|
QString zone;
|
||||||
|
float reverbTime;
|
||||||
|
float wetLevel;
|
||||||
|
};
|
||||||
|
QVector<ReverbSettings> _zoneReverbSettings;
|
||||||
|
|
||||||
static InboundAudioStream::Settings _streamSettings;
|
static InboundAudioStream::Settings _streamSettings;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue