-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMenuReverb.cpp
61 lines (57 loc) · 1.67 KB
/
MenuReverb.cpp
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "StdAfx.h"
#include "Menu.h"
#include "MenuReverb.h"
#include "Effect.h"
#include "Console.h"
namespace Menu
{
Reverb menu_fx_reverb({ 61, page_pos.Y + 9, 61 + 18, page_pos.Y + 9 + Reverb::COUNT }, "REVERB", Reverb::COUNT);
void Reverb::Update(int index, int sign, DWORD modifiers)
{
switch (index)
{
case TITLE:
fx_active[BASS_FX_DX8_REVERB] = sign > 0;
EnableEffect(BASS_FX_DX8_REVERB, fx_active[BASS_FX_DX8_REVERB]);
break;
case GAIN:
UpdateProperty(fx_reverb.fInGain, sign, modifiers, 100, time_step, -96, 0);
break;
case REVERB_MIX:
UpdateProperty(fx_reverb.fReverbMix, sign, modifiers, 100, time_step, -96, 0);
break;
case DECAY_TIME:
UpdateProperty(fx_reverb.fReverbTime, sign, modifiers, 10, time_step, 0.001f, 3000);
break;
case DECAY_HF_RATIO:
UpdateProperty(fx_reverb.fHighFreqRTRatio, sign, modifiers, 10000, time_step, 0.001f, 0.999f);
break;
default:
__assume(0);
}
UpdateEffect(BASS_FX_DX8_REVERB);
}
void Reverb::Print(int index, HANDLE hOut, COORD pos, DWORD flags)
{
switch (index)
{
case TITLE:
PrintTitle(hOut, fx_active[BASS_FX_DX8_REVERB], flags, " ON", "OFF");
break;
case GAIN:
PrintItemFloat(hOut, pos, flags, "Gain: %+6.2fdB", fx_reverb.fInGain);
break;
case REVERB_MIX:
PrintItemFloat(hOut, pos, flags, "Mix: %+6.2fdB", fx_reverb.fReverbMix);
break;
case DECAY_TIME:
PrintItemFloat(hOut, pos, flags, "Decay: %7.2fms", fx_reverb.fReverbTime);
break;
case DECAY_HF_RATIO:
PrintItemFloat(hOut, pos, flags, "HF Ratio: %6.4f", fx_reverb.fHighFreqRTRatio);
break;
default:
__assume(0);
}
}
}