mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:08:54 +02:00
Merge pull request #9679 from zzmp/fix/audio-assert-ignore-memoization
Loosen audio memoization precondition
This commit is contained in:
commit
a976d191ad
2 changed files with 2 additions and 5 deletions
|
@ -548,9 +548,6 @@ AudioMixerClientData::IgnoreZone& AudioMixerClientData::IgnoreZoneMemo::get(unsi
|
||||||
_zone = box;
|
_zone = box;
|
||||||
unsigned int oldFrame = _frame.exchange(frame, std::memory_order_release);
|
unsigned int oldFrame = _frame.exchange(frame, std::memory_order_release);
|
||||||
Q_UNUSED(oldFrame);
|
Q_UNUSED(oldFrame);
|
||||||
|
|
||||||
// check the precondition
|
|
||||||
assert(oldFrame == 0 || frame == (oldFrame + 1));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
AvatarAudioStream* getAvatarAudioStream();
|
AvatarAudioStream* getAvatarAudioStream();
|
||||||
|
|
||||||
// returns whether self (this data's node) should ignore node, memoized by frame
|
// returns whether self (this data's node) should ignore node, memoized by frame
|
||||||
// precondition: frame is monotonically increasing after first call
|
// precondition: frame is increasing after first call (including overflow wrap)
|
||||||
bool shouldIgnore(SharedNodePointer self, SharedNodePointer node, unsigned int frame);
|
bool shouldIgnore(SharedNodePointer self, SharedNodePointer node, unsigned int frame);
|
||||||
|
|
||||||
// the following methods should be called from the AudioMixer assignment thread ONLY
|
// the following methods should be called from the AudioMixer assignment thread ONLY
|
||||||
|
@ -131,7 +131,7 @@ private:
|
||||||
|
|
||||||
// returns an ignore zone, memoized by frame (lockless if the zone is already memoized)
|
// returns an ignore zone, memoized by frame (lockless if the zone is already memoized)
|
||||||
// preconditions:
|
// preconditions:
|
||||||
// - frame is monotonically increasing after first call
|
// - frame is increasing after first call (including overflow wrap)
|
||||||
// - there are no references left from calls to getIgnoreZone(frame - 1)
|
// - there are no references left from calls to getIgnoreZone(frame - 1)
|
||||||
IgnoreZone& get(unsigned int frame);
|
IgnoreZone& get(unsigned int frame);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue