mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Tweaked AudioDeviceManager::getXRunCount() to take into account xruns from both the device and the manager's measurements
This commit is contained in:
parent
92e97624b1
commit
aa7d7aee78
1 changed files with 2 additions and 2 deletions
|
|
@ -722,7 +722,7 @@ void AudioDeviceManager::audioDeviceIOCallbackInt (const float** inputChannelDat
|
|||
cpuUsageMs += filterAmount * (msTaken - cpuUsageMs);
|
||||
|
||||
if (msTaken > msPerBlock)
|
||||
xruns++;
|
||||
++xruns;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -996,7 +996,7 @@ void AudioDeviceManager::playTestSound()
|
|||
int AudioDeviceManager::getXRunCount() const noexcept
|
||||
{
|
||||
auto deviceXRuns = (currentAudioDevice != nullptr ? currentAudioDevice->getXRunCount() : -1);
|
||||
return (deviceXRuns >= 0 ? deviceXRuns : xruns);
|
||||
return jmax (0, deviceXRuns) + xruns;
|
||||
}
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue