aboutsummaryrefslogtreecommitdiff
path: root/src/chips/dosbox/dbopl.h
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-08-06 01:56:50 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-08-06 01:56:50 +0300
commit1ab34e88a326c396fbb42c503eb4ffa56fa0a148 (patch)
tree4f2d6ada0ab0bd1d64947a71c5492a29be7c8dbf /src/chips/dosbox/dbopl.h
parent0a003c8bc12514a5586f2f0e40559fcbf6607883 (diff)
parent0e2807a9d4c8c900e85c9b33ba96c69a82c58a68 (diff)
downloadlibADLMIDI-1ab34e88a326c396fbb42c503eb4ffa56fa0a148.tar.gz
libADLMIDI-1ab34e88a326c396fbb42c503eb4ffa56fa0a148.tar.bz2
libADLMIDI-1ab34e88a326c396fbb42c503eb4ffa56fa0a148.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/chips/dosbox/dbopl.h')
-rw-r--r--src/chips/dosbox/dbopl.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/chips/dosbox/dbopl.h b/src/chips/dosbox/dbopl.h
index 73c0aa9..429735f 100644
--- a/src/chips/dosbox/dbopl.h
+++ b/src/chips/dosbox/dbopl.h
@@ -75,13 +75,13 @@ typedef enum {
sm3AMAM,
sm6Start,
sm2Percussion,
- sm3Percussion,
+ sm3Percussion
} SynthMode;
//Shifts for the values contained in chandata variable
enum {
SHIFT_KSLBASE = 16,
- SHIFT_KEYCODE = 24,
+ SHIFT_KEYCODE = 24
};
struct Operator {
@@ -91,7 +91,7 @@ public:
MASK_KSR = 0x10,
MASK_SUSTAIN = 0x20,
MASK_VIBRATO = 0x40,
- MASK_TREMOLO = 0x80,
+ MASK_TREMOLO = 0x80
};
typedef enum {
@@ -99,7 +99,7 @@ public:
RELEASE,
SUSTAIN,
DECAY,
- ATTACK,
+ ATTACK
} State;
VolumeHandler volHandler;
@@ -192,6 +192,9 @@ struct Channel {
Bit8s maskLeft; //Sign extended values for both channel's panning
Bit8s maskRight;
+ Bit16u panLeft; // Extended behavior, scale values for soft panning
+ Bit16u panRight;
+
//Forward the channel data to the operators of the channel
void SetChanData( const Chip* chip, Bit32u data );
//Change in the chandata, check for new values and if we have to forward to operators
@@ -201,6 +204,8 @@ struct Channel {
void WriteB0( const Chip* chip, Bit8u val );
void WriteC0( const Chip* chip, Bit8u val );
+ void WritePan( Bit8u val );
+
//call this for the first channel
template< bool opl3Mode >
void GeneratePercussion( Chip* chip, Bit32s* output );
@@ -271,6 +276,7 @@ struct Chip {
struct Handler {
DBOPL::Chip chip;
+ void WritePan( Bit32u port, Bit8u val );
Bit32u WriteAddr( Bit32u port, Bit8u val );
void WriteReg( Bit32u addr, Bit8u val );
void GenerateArr(Bit32s *out, Bitu *samples);