From 033d89a9ab6660f15798344af15cdabef8e872b8 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 12 Aug 2021 13:01:07 +0300 Subject: Refactor cAudioManager::ProcessActiveQueues, fix doppler effect --- src/core/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/common.h') diff --git a/src/core/common.h b/src/core/common.h index da162762..3f69a394 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -292,6 +292,8 @@ extern wchar *AllocUnicode(const char*src); #define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) +#define Clamp2(v, center, radius) ((v) > (center) ? Min(v, center + radius) : Max(v, center - radius)) + inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) -- cgit v1.2.3