summaryrefslogtreecommitdiff
path: root/src/mixer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixer.cpp')
-rw-r--r--src/mixer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mixer.cpp b/src/mixer.cpp
index 5945bd235..6aaa8204d 100644
--- a/src/mixer.cpp
+++ b/src/mixer.cpp
@@ -12,6 +12,7 @@
#include "stdafx.h"
#include <math.h>
#include "core/math_func.hpp"
+#include "framerate_type.h"
#include "safeguards.h"
@@ -138,6 +139,13 @@ static void MxCloseChannel(MixerChannel *mc)
void MxMixSamples(void *buffer, uint samples)
{
+ PerformanceMeasurer framerate(PFE_SOUND);
+ static uint last_samples = 0;
+ if (samples != last_samples) {
+ framerate.SetExpectedRate((double)_play_rate / samples);
+ last_samples = samples;
+ }
+
MixerChannel *mc;
/* Clear the buffer */