2021-04-01 02:07:58 +02:00
|
|
|
#include "JSystem/JAudio2/JAISoundParams.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
#include "dol2asm.h"
|
|
|
|
|
#include "dolphin/types.h"
|
|
|
|
|
|
2021-09-30 07:13:49 -07:00
|
|
|
void JAISoundParamsMove::moveVolume(f32 newValue, u32 count) {
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
mParams.mVolume = newValue;
|
|
|
|
|
mTransition.mVolume.mCount = 0;
|
|
|
|
|
} else {
|
|
|
|
|
mTransition.mVolume.set(newValue, mParams.mVolume, count);
|
|
|
|
|
}
|
2021-03-28 22:49:05 +02:00
|
|
|
}
|
|
|
|
|
|
2021-09-30 07:13:49 -07:00
|
|
|
void JAISoundParamsMove::movePitch(f32 newValue, u32 count) {
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
mParams.mPitch = newValue;
|
|
|
|
|
mTransition.mPitch.mCount = 0;
|
|
|
|
|
} else {
|
|
|
|
|
mTransition.mPitch.set(newValue, mParams.mPitch, count);
|
|
|
|
|
}
|
2021-03-28 22:49:05 +02:00
|
|
|
}
|
|
|
|
|
|
2021-09-30 07:13:49 -07:00
|
|
|
void JAISoundParamsMove::moveFxMix(f32 newValue, u32 count) {
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
mParams.mFxMix = newValue;
|
|
|
|
|
mTransition.mFxMix.mCount = 0;
|
|
|
|
|
} else {
|
|
|
|
|
mTransition.mFxMix.set(newValue, mParams.mFxMix, count);
|
|
|
|
|
}
|
2021-03-28 22:49:05 +02:00
|
|
|
}
|
|
|
|
|
|
2021-09-30 07:13:49 -07:00
|
|
|
void JAISoundParamsMove::movePan(f32 newValue, u32 count) {
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
mParams.mPan = newValue;
|
|
|
|
|
mTransition.mPan.mCount = 0;
|
|
|
|
|
} else {
|
|
|
|
|
mTransition.mPan.set(newValue, mParams.mPan, count);
|
|
|
|
|
}
|
2021-03-28 22:49:05 +02:00
|
|
|
}
|
|
|
|
|
|
2021-09-30 07:13:49 -07:00
|
|
|
void JAISoundParamsMove::moveDolby(f32 newValue, u32 count) {
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
mParams.mDolby = newValue;
|
|
|
|
|
mTransition.mDolby.mCount = 0;
|
|
|
|
|
} else {
|
|
|
|
|
mTransition.mDolby.set(newValue, mParams.mDolby, count);
|
|
|
|
|
}
|
2021-03-28 22:49:05 +02:00
|
|
|
}
|