mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
Merge pull request #4261 from Atlante45/reverb_memory_leak
Reverb memory leak
This commit is contained in:
commit
cf5fb49562
3 changed files with 17 additions and 1 deletions
|
@ -135,6 +135,15 @@ AudioClient::AudioClient() :
|
|||
updateTimer->start(DEVICE_CHECK_INTERVAL_MSECS);
|
||||
}
|
||||
|
||||
AudioClient::~AudioClient() {
|
||||
if (_gverbLocal) {
|
||||
gverb_free(_gverbLocal);
|
||||
}
|
||||
if (_gverb) {
|
||||
gverb_free(_gverb);
|
||||
}
|
||||
}
|
||||
|
||||
void AudioClient::reset() {
|
||||
_receivedAudioStream.reset();
|
||||
_stats.reset();
|
||||
|
@ -522,10 +531,17 @@ bool AudioClient::switchOutputToAudioDevice(const QString& outputDeviceName) {
|
|||
|
||||
void AudioClient::initGverb() {
|
||||
// Initialize a new gverb instance
|
||||
if (_gverbLocal) {
|
||||
gverb_free(_gverbLocal);
|
||||
}
|
||||
_gverbLocal = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
|
||||
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
|
||||
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
|
||||
_reverbOptions->getTailLevel());
|
||||
|
||||
if (_gverb) {
|
||||
gverb_free(_gverb);
|
||||
}
|
||||
_gverb = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
|
||||
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
|
||||
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
|
||||
|
|
|
@ -186,6 +186,7 @@ signals:
|
|||
|
||||
protected:
|
||||
AudioClient();
|
||||
~AudioClient();
|
||||
|
||||
private:
|
||||
void outputFormatChanged();
|
||||
|
|
|
@ -1166,7 +1166,6 @@ int matchTextureUVSetToAttributeChannel(const QString& texUVSetName, const QHash
|
|||
|
||||
FBXLight extractLight(const FBXNode& object) {
|
||||
FBXLight light;
|
||||
int unkwnon = 0;
|
||||
foreach (const FBXNode& subobject, object.children) {
|
||||
QString childname = QString(subobject.name);
|
||||
if (subobject.name == "Properties70") {
|
||||
|
|
Loading…
Reference in a new issue