1
0
Fork 0

Switch to a different way to calculate the table offsets. Thanks jmarsh

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4282
This commit is contained in:
Peter Veenstra 2019-11-11 17:23:05 +00:00
parent 8f3474ecfd
commit 92da7c45ef
2 changed files with 7 additions and 10 deletions

View file

@ -156,7 +156,7 @@ public:
};
struct Channel {
Operator op[2];
Operator op[2]; //Leave on top of struct for simpler pointer math.
inline Operator* Op( Bitu index ) {
return &( ( this + (index >> 1) )->op[ index & 1 ]);
}
@ -192,6 +192,9 @@ struct Channel {
};
struct Chip {
//18 channels with 2 operators each. Leave on top of struct for simpler pointer math.
Channel chan[18];
//This is used as the base counter for vibrato and tremolo
Bit32u lfoCounter;
Bit32u lfoAdd;
@ -208,9 +211,6 @@ struct Chip {
//Best match attack rates for the rate of this chip
Bit32u attackRates[76];
//18 channels with 2 operators each
Channel chan[18];
Bit8u reg104;
Bit8u reg08;
Bit8u reg04;