Files
dusklight/include/JSystem/JAudio2/JASSoundParams.h
T
TakaRikka c9e2a73dda 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

72 lines
1.5 KiB
C

#ifndef JASSOUNDPARAMS_H
#define JASSOUNDPARAMS_H
#include <dolphin/types.h>
/**
* @ingroup jsystem-jaudio
*
*/
struct JASSoundParams {
void clamp();
void combine(JASSoundParams const&, JASSoundParams const&);
void initVolume() { mVolume = 1.0f; }
void initFxMix() { mFxMix = 0.0f; }
void initPitch() { mPitch = 1.0f; }
void initPan() { mPan = 0.5f; }
void initDolby() { mDolby = 0.0f; }
void init() {
initVolume();
initPitch();
initFxMix();
initPan();
initDolby();
}
JASSoundParams() { init(); }
void clampVolume() {
if (mVolume < 0.0f)
mVolume = 0.0f;
else if (mVolume > 1.0f)
mVolume = 1.0f;
}
void clampFxMix(void) {
if (mFxMix < 0.0f)
mFxMix = 0.0f;
else if (mFxMix > 1.0f)
mFxMix = 1.0f;
}
void clampPitch() {
if (mPitch < 0.0f)
mPitch = 0.0f;
else if (mPitch > 8.0f)
mPitch = 8.0f;
}
void clampPan() {
if (mPan < 0.0f)
mPan = 0.0f;
else if (mPan > 1.0f)
mPan = 1.0f;
}
void clampDolby() {
if (mDolby < 0.0f)
mDolby = 0.0f;
else if (mDolby > 1.0f)
mDolby = 1.0f;
}
/* 0x00 */ f32 mVolume;
/* 0x04 */ f32 mFxMix;
/* 0x08 */ f32 mPitch;
/* 0x0C */ f32 mPan;
/* 0x10 */ f32 mDolby;
}; // Size: 0x14
#endif /* JASSOUNDPARAMS_H */