From 0f69d504792776967b61f8987ad458c48b4a322f Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 29 Jul 2018 20:52:26 -0700 Subject: Implemented optional soft panning support for the included chip emulators, disabled by default. --- src/chips/dosbox/dbopl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/chips/dosbox/dbopl.h') diff --git a/src/chips/dosbox/dbopl.h b/src/chips/dosbox/dbopl.h index 73c0aa9..c265fc6 100644 --- a/src/chips/dosbox/dbopl.h +++ b/src/chips/dosbox/dbopl.h @@ -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); -- cgit v1.2.3 From e098e4285af6d565d7b603279ec6e9770ce88436 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Tue, 31 Jul 2018 02:31:47 +0200 Subject: fix some warnings --- src/chips/dosbox/dbopl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/chips/dosbox/dbopl.h') diff --git a/src/chips/dosbox/dbopl.h b/src/chips/dosbox/dbopl.h index c265fc6..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; -- cgit v1.2.3