Skip to content

Commit

Permalink
Catch errors with audio level detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlamkins committed Oct 15, 2020
1 parent 013e517 commit 7bb82c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Blish HUD/GameServices/GameIntegration/AudioIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ public override void Update(GameTime gameTime) {
if (_timeSinceCheck > CHECK_INTERVAL) {
_timeSinceCheck -= CHECK_INTERVAL;

_audioPeakBuffer.PushValue(_processMeterInformation.GetPeakValue());
try {
_audioPeakBuffer.PushValue(_processMeterInformation.GetPeakValue());
} catch (Exception e) {
// Punish audio clock for 10 seconds
_timeSinceCheck = -10000;

Logger.Debug(e, "Getting meter volume failed.");
}

_averageGameVolume = null;
}
Expand Down

0 comments on commit 7bb82c0

Please sign in to comment.