-
Notifications
You must be signed in to change notification settings - Fork 1
/
LamePaula.h
75 lines (61 loc) · 1.47 KB
/
LamePaula.h
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
#ifndef LAMEPAULA_H
#define LAMEPAULA_H
#include "MyTypes.h"
extern uword MIXER_patterns;
extern uword MIXER_samples;
extern uword MIXER_voices;
extern ubyte MIXER_speed;
extern ubyte MIXER_bpm;
extern ubyte MIXER_count;
extern uword MIXER_minPeriod;
extern uword MIXER_maxPeriod;
extern const char* mixerFormatName;
extern void (*mixerPlayRout)();
extern void mixerSetBpm( uword );
struct _paula
{
// Paula
const ubyte* start; // start address
uword length; // length in 16-bit words
uword period;
uword volume; // 0-64
};
class channel
{
public:
_paula paula;
bool isOn;
const ubyte* start;
const ubyte* end;
udword length;
const ubyte* repeatStart;
const ubyte* repeatEnd;
udword repeatLength;
ubyte bitsPerSample;
uword volume;
uword period;
udword sampleFrequency;
bool sign;
bool looping; // whether to loop sample buffer continously (PAULA emu)
ubyte panning;
//
uword curPeriod;
udword stepSpeed;
udword stepSpeedPnt;
udword stepSpeedAddPnt;
void off()
{
isOn = false;
}
channel()
{
off();
}
void on();
void takeNextBuf(); // take parameters from paula.* (or just to repeat.*)
void updatePerVol(); // period, volume
};
void mixerFillBuffer( void* buffer, udword bufferLen );
void mixerInit(udword freq, int bits, int channels, uword zero);
void mixerSetReplayingSpeed();
#endif // LAMEPAULA_H