Files
tp/include/JSystem/JAudio2/JASCalc.h
T

46 lines
1.1 KiB
C++
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef JASCALC_H
#define JASCALC_H
#include "dolphin/types.h"
2023-08-01 10:17:21 +03:00
2024-04-12 00:10:30 -06:00
/**
* @ingroup jsystem-jaudio
*
*/
2023-08-01 10:17:21 +03:00
struct JASCalc {
/* 8028F2E8 */ static void imixcopy(s16 const*, s16 const*, s16*, u32);
/* 8028F318 */ static void bcopyfast(void const*, void*, u32);
/* 8028F354 */ static void bcopy(void const*, void*, u32);
/* 8028F454 */ static void bzerofast(void*, u32);
/* 8028F480 */ static void bzero(void*, u32);
/* 8028F578 */ static f32 pow2(f32);
2023-11-11 05:18:11 +02:00
// Could not make it work as inline - specialization is in JASCalc.cpp
2023-08-01 10:17:21 +03:00
template <typename A, typename B>
static A clamp(B x); /* {
if (std::numeric_limits<A>::min() >= x)
return std::numeric_limits<A>::min();
if (x >= std::numeric_limits<A>::max())
return std::numeric_limits<A>::max();
return x;
} */
2024-02-11 00:29:35 -05:00
static f32 clamp01(f32 i_value) {
if (i_value <= 0.0f) {
return 0.0f;
}
if (i_value >= 1.0f) {
return 1.0f;
}
return i_value;
}
2023-08-01 10:17:21 +03:00
f32 fake1();
f32 fake2(long x);
f32 fake3();
static s16 const CUTOFF_TO_IIR_TABLE[128][4];
2023-08-01 10:17:21 +03:00
};
2021-03-28 22:49:05 +02:00
#endif /* JASCALC_H */