AEEnvlp.c++
1.63 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*****************************************************************************
* File: AEEnvlp.c++
*
* AEEnvlp Class Implementations
*
****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "Assets.h"
#include "Mgrs.h"
/*****************************************************************************
*
* Initialization Routines
*
****************************************************************************/
AEEnvlp::AEEnvlp()
{
classType = AL_ENVLP_CLASS;
attackTime = 10000; // pick some nice defaults
attackLevel = 127;
decayTime = 100000;
decayLevel = 100;
releaseTime = 20000;
assert(theU64Dev->AllocHdwr(this,AL_ENVLP_CLASS) == 0);
}
AEEnvlp::~AEEnvlp()
{
theU64Dev->DeallocHdwr(this);
}
/*****************************************************************************
*
* Asset's Methods
*
****************************************************************************/
void AEEnvlp::SetAttackTime(int time)
{
attackTime = time;
}
void AEEnvlp::SetAttackLevel(int level)
{
attackLevel = level;
}
void AEEnvlp::SetDecayTime(int time)
{
decayTime = time;
}
void AEEnvlp::SetDecayLevel(int level)
{
decayLevel = level;
}
void AEEnvlp::SetReleaseTime(int time)
{
releaseTime = time;
}
int AEEnvlp::GetAttackTime(void)
{
return attackTime;
}
int AEEnvlp::GetAttackLevel(void)
{
return attackLevel;
}
int AEEnvlp::GetDecayTime(void)
{
return decayTime;
}
int AEEnvlp::GetDecayLevel(void)
{
return decayLevel;
}
int AEEnvlp::GetReleaseTime(void)
{
return releaseTime;
}