mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:10:25 +02:00
reinstate delete for starved but started audio ring buffers
This commit is contained in:
parent
0446aeb4d3
commit
87e5579e52
2 changed files with 6 additions and 5 deletions
|
@ -94,11 +94,10 @@ void AudioMixerClientData::pushBuffersAfterFrameSend() {
|
||||||
audioBuffer->shiftReadPosition(NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL);
|
audioBuffer->shiftReadPosition(NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL);
|
||||||
|
|
||||||
audioBuffer->setWillBeAddedToMix(false);
|
audioBuffer->setWillBeAddedToMix(false);
|
||||||
} else if (audioBuffer->isStarved()) {
|
} else if (audioBuffer->hasStarted() && audioBuffer->isStarved()) {
|
||||||
// this was previously the kill for injected audio from a client
|
// this is an empty audio buffer that has starved, safe to delete
|
||||||
// fix when that is added back
|
delete audioBuffer;
|
||||||
// delete audioBuffer;
|
_ringBuffers.erase(_ringBuffers.begin() + i);
|
||||||
// _ringBuffers.erase(_ringBuffers.begin() + i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,8 @@ public:
|
||||||
|
|
||||||
bool isStarved() const { return _isStarved; }
|
bool isStarved() const { return _isStarved; }
|
||||||
void setIsStarved(bool isStarved) { _isStarved = isStarved; }
|
void setIsStarved(bool isStarved) { _isStarved = isStarved; }
|
||||||
|
|
||||||
|
bool hasStarted() const { return _hasStarted; }
|
||||||
protected:
|
protected:
|
||||||
// disallow copying of AudioRingBuffer objects
|
// disallow copying of AudioRingBuffer objects
|
||||||
AudioRingBuffer(const AudioRingBuffer&);
|
AudioRingBuffer(const AudioRingBuffer&);
|
||||||
|
|
Loading…
Reference in a new issue