AELoop.c++
1.48 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
/*****************************************************************************
* File: AELoop.c++
*
* AELoop Class Implementations
*
****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "Assets.h"
#include "Mgrs.h"
/*****************************************************************************
*
* Initialization Routines
*
****************************************************************************/
AELoop::AELoop()
{
int c;
classType = AL_LOOP_CLASS;
start = 0;
end = 0;
count = 0;
for(c = 0; c < ADPCMFSIZE ; c++)
state[c] = 0;
assert(theU64Dev->AllocHdwr(this,AL_LOOP_CLASS) == 0);
}
AELoop::~AELoop()
{
theU64Dev->DeallocHdwr(this);
}
/*****************************************************************************
*
* Asset's Methods
*
****************************************************************************/
void AELoop::SetStart(int s)
{
start = s;
}
void AELoop::SetEnd(int e)
{
end = e;
}
void AELoop::SetCount(int c)
{
count = c;
}
void AELoop::SetState(short *st)
{
int c;
for(c = 0; c < ADPCMFSIZE; c++)
state[c] = st[c];
}
int AELoop::GetStart(void)
{
return start;
}
int AELoop::GetEnd(void)
{
return end;
}
int AELoop::GetCount(void)
{
return count;
}
void AELoop::GetState(short *st)
{
int c;
for(c = 0; c < ADPCMFSIZE; c++)
st[c] = state[c];
}