[Scummvm-cvs-logs] SF.net SVN: scummvm:[51648] scummvm/trunk/sound/softsynth/fmtowns_pc98

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Mon Aug 2 20:53:24 CEST 2010


Revision: 51648
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51648&view=rev
Author:   athrxx
Date:     2010-08-02 18:53:23 +0000 (Mon, 02 Aug 2010)

Log Message:
-----------
KYRA/TOWNS AUDIO: try to fix last regression

Modified Paths:
--------------
    scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_driver.h
    scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
    scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h

Modified: scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_driver.h
===================================================================
--- scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_driver.h	2010-08-02 18:37:37 UTC (rev 51647)
+++ scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_driver.h	2010-08-02 18:53:23 UTC (rev 51648)
@@ -28,6 +28,11 @@
 
 #include "sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h"
 
+class TownsPC98_MusicChannel;
+class TownsPC98_MusicChannelSSG;
+class TownsPC98_SfxChannel;
+class TownsPC98_MusicChannelPCM;
+
 class TownsPC98_AudioDriver : public TownsPC98_FmSynth {
 friend class TownsPC98_MusicChannel;
 friend class TownsPC98_MusicChannelSSG;

Modified: scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp	2010-08-02 18:37:37 UTC (rev 51647)
+++ scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp	2010-08-02 18:53:23 UTC (rev 51648)
@@ -26,73 +26,6 @@
 #include "sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h"
 #include "common/endian.h"
 
-class TownsPC98_FmSynthOperator {
-public:
-	TownsPC98_FmSynthOperator(const uint32 timerbase, const uint8 *rateTable,
-		const uint8 *shiftTable, const uint8 *attackDecayTable, const uint32 *frqTable,
-		const uint32 *sineTable, const int32 *tlevelOut, const int32 *detuneTable);
-	~TownsPC98_FmSynthOperator() {}
-
-	void keyOn();
-	void keyOff();
-	void frequency(int freq);
-	void updatePhaseIncrement();
-	void recalculateRates();
-	void generateOutput(int32 phasebuf, int32 *feedbuf, int32 &out);
-
-	void feedbackLevel(int32 level) {_feedbackLevel = level ? level + 6 : 0; }
-	void detune(int value) { _detn = &_detnTbl[value << 5]; }
-	void multiple(uint32 value) { _multiple = value ? (value << 1) : 1;	}
-	void attackRate(uint32 value) { _specifiedAttackRate = value; }
-	bool scaleRate(uint8 value);
-	void decayRate(uint32 value) { _specifiedDecayRate = value;	recalculateRates();	}
-	void sustainRate(uint32 value) { _specifiedSustainRate = value;	recalculateRates();	}
-	void sustainLevel(uint32 value) { _sustainLevel = (value == 0x0f) ? 0x3e0 : value << 5; }
-	void releaseRate(uint32 value) { _specifiedReleaseRate = value;	recalculateRates();	}
-	void totalLevel(uint32 value) { _totalLevel = value << 3; }
-	void ampModulation(bool enable) { _ampMod = enable; }
-	void reset();
-
-protected:
-	EnvelopeState _state;
-	bool _playing;
-	uint32 _feedbackLevel;
-	uint32 _multiple;
-	uint32 _totalLevel;
-	uint8 _keyScale1;
-	uint8 _keyScale2;
-	uint32 _specifiedAttackRate;
-	uint32 _specifiedDecayRate;
-	uint32 _specifiedSustainRate;
-	uint32 _specifiedReleaseRate;
-	uint32 _tickCount;
-	uint32 _sustainLevel;
-	
-	bool _ampMod;
-	uint32 _frequency;
-	uint8 _kcode;
-	uint32 _phase;
-	uint32 _phaseIncrement;
-	const int32 *_detn;
-
-	const uint8 *_rateTbl;
-	const uint8 *_rshiftTbl;
-	const uint8 *_adTbl;
-	const uint32 *_fTbl;
-	const uint32 *_sinTbl;
-	const int32 *_tLvlTbl;
-	const int32 *_detnTbl;
-
-	const uint32 _tickLength;
-	uint32 _timer;
-	int32 _currentLevel;
-
-	struct EvpState {
-		uint8 rate;
-		uint8 shift;
-	} fs_a, fs_d, fs_s, fs_r;
-};
-
 TownsPC98_FmSynthOperator::TownsPC98_FmSynthOperator(const uint32 timerbase, const uint8 *rateTable,
 	const uint8 *shiftTable, const uint8 *attackDecayTable,	const uint32 *frqTable,
 	const uint32 *sineTable, const int32 *tlevelOut, const int32 *detuneTable) :

Modified: scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
===================================================================
--- scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h	2010-08-02 18:37:37 UTC (rev 51647)
+++ scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h	2010-08-02 18:53:23 UTC (rev 51648)
@@ -30,7 +30,6 @@
 #include "sound/mixer.h"
 #include "common/list.h"
 
-class TownsPC98_FmSynthOperator;
 class TownsPC98_FmSynthSquareSineSource;
 class TownsPC98_FmSynthPercussionSource;
 
@@ -42,6 +41,73 @@
 	kEnvReleasing
 };
 
+class TownsPC98_FmSynthOperator {
+public:
+	TownsPC98_FmSynthOperator(const uint32 timerbase, const uint8 *rateTable,
+		const uint8 *shiftTable, const uint8 *attackDecayTable, const uint32 *frqTable,
+		const uint32 *sineTable, const int32 *tlevelOut, const int32 *detuneTable);
+	~TownsPC98_FmSynthOperator() {}
+
+	void keyOn();
+	void keyOff();
+	void frequency(int freq);
+	void updatePhaseIncrement();
+	void recalculateRates();
+	void generateOutput(int32 phasebuf, int32 *feedbuf, int32 &out);
+
+	void feedbackLevel(int32 level) {_feedbackLevel = level ? level + 6 : 0; }
+	void detune(int value) { _detn = &_detnTbl[value << 5]; }
+	void multiple(uint32 value) { _multiple = value ? (value << 1) : 1;	}
+	void attackRate(uint32 value) { _specifiedAttackRate = value; }
+	bool scaleRate(uint8 value);
+	void decayRate(uint32 value) { _specifiedDecayRate = value;	recalculateRates();	}
+	void sustainRate(uint32 value) { _specifiedSustainRate = value;	recalculateRates();	}
+	void sustainLevel(uint32 value) { _sustainLevel = (value == 0x0f) ? 0x3e0 : value << 5; }
+	void releaseRate(uint32 value) { _specifiedReleaseRate = value;	recalculateRates();	}
+	void totalLevel(uint32 value) { _totalLevel = value << 3; }
+	void ampModulation(bool enable) { _ampMod = enable; }
+	void reset();
+
+protected:
+	EnvelopeState _state;
+	bool _playing;
+	uint32 _feedbackLevel;
+	uint32 _multiple;
+	uint32 _totalLevel;
+	uint8 _keyScale1;
+	uint8 _keyScale2;
+	uint32 _specifiedAttackRate;
+	uint32 _specifiedDecayRate;
+	uint32 _specifiedSustainRate;
+	uint32 _specifiedReleaseRate;
+	uint32 _tickCount;
+	uint32 _sustainLevel;
+	
+	bool _ampMod;
+	uint32 _frequency;
+	uint8 _kcode;
+	uint32 _phase;
+	uint32 _phaseIncrement;
+	const int32 *_detn;
+
+	const uint8 *_rateTbl;
+	const uint8 *_rshiftTbl;
+	const uint8 *_adTbl;
+	const uint32 *_fTbl;
+	const uint32 *_sinTbl;
+	const int32 *_tLvlTbl;
+	const int32 *_detnTbl;
+
+	const uint32 _tickLength;
+	uint32 _timer;
+	int32 _currentLevel;
+
+	struct EvpState {
+		uint8 rate;
+		uint8 shift;
+	} fs_a, fs_d, fs_s, fs_r;
+};
+
 class TownsPC98_FmSynth : public Audio::AudioStream {
 public:
 	enum EmuType {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list