Files
tp/include/JSystem/JAudio2/JASCalc.h
T
TakaRikka 5867eaf68b general cleanup, d_menu_quit / d_a_obj_testcube mostly done, d_msg_scrn_explain debug (#3065)
* typedef for cPhs_Step

* make sdk includes consistent

* d_menu_quit / d_msg_scrn_explain debug

* d_a_obj_testcube mostly done

* d_debug_pad mostly done

* jstudio tool library headers

* some JStudioCameraEditor headers

* d_jcam_editor mostly done

* try fixing some shield regressions

* d_bg_parts mostly done

* fix merge errors

* debug fix
2026-01-24 23:36:23 -08:00

46 lines
1.1 KiB
C++

#ifndef JASCALC_H
#define JASCALC_H
#include <dolphin/types.h>
/**
* @ingroup jsystem-jaudio
*
*/
struct JASCalc {
static void imixcopy(const s16*, const s16*, s16*, u32);
static void bcopyfast(const void* src, void* dest, u32 size);
static void bcopy(const void* src, void* dest, u32 size);
static void bzerofast(void* dest, u32 size);
static void bzero(void* dest, u32 size);
static f32 pow2(f32);
// Could not make it work as inline - specialization is in JASCalc.cpp
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;
} */
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;
}
f32 fake1();
f32 fake2(s32 x);
f32 fake3();
static const s16 CUTOFF_TO_IIR_TABLE[128][4];
};
#endif /* JASCALC_H */