summaryrefslogtreecommitdiff
path: root/libs/JSystem/JAudio2/JAISoundParams.cpp
blob: dcd0d10cd5b8a73cd28ca4ad8c784abc4404f9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "JSystem/JAudio2/JAISoundParams.h"

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);
    }
}

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);
    }
}

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);
    }
}

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);
    }
}

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);
    }
}