diff options
| author | Jussi Pitkanen | 2011-04-09 19:11:25 +0300 | 
|---|---|---|
| committer | Jussi Pitkanen | 2011-04-09 19:11:25 +0300 | 
| commit | 4b3f081ee01cb3ed269a99065f35aff7982956dc (patch) | |
| tree | 7a3f979888874738f1f700a1a2c40f62a33cb7c6 | |
| parent | fbb2d4d6ccb26b419c1d854fbbfa8b7b0b7ef53a (diff) | |
| download | scummvm-rg350-4b3f081ee01cb3ed269a99065f35aff7982956dc.tar.gz scummvm-rg350-4b3f081ee01cb3ed269a99065f35aff7982956dc.tar.bz2 scummvm-rg350-4b3f081ee01cb3ed269a99065f35aff7982956dc.zip | |
AGI: Cleanup sound_2gs.*
| -rw-r--r-- | engines/agi/sound_2gs.cpp | 15 | ||||
| -rw-r--r-- | engines/agi/sound_2gs.h | 3 | 
2 files changed, 9 insertions, 9 deletions
| diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp index 239290716a..65d60d392b 100644 --- a/engines/agi/sound_2gs.cpp +++ b/engines/agi/sound_2gs.cpp @@ -170,10 +170,13 @@ uint32 SoundGen2GS::generateOutput() {  				}  			} -			// TODO: Advance vibrato here. Apple IIGS uses a LFO with -			// a triangle wave for vibrato. None of the instruments in the -			// current mappings from MIDI program number to instrument use -			// vibrato, but some of the choices are possibly still wrong. +			// TODO: Advance vibrato here. The Apple IIGS uses a LFO with +			// triangle wave to modulate the frequency of both oscillators. +			// In Apple IIGS the vibrato and the envelope are updated at the +			// same time, so the vibrato speed depends on ENVELOPE_COEF. +			// Note: None of the instruments in the current mappings from +			// MIDI program number to instrument use vibrato, but some of +			// the choices are possibly still wrong.  			// Advance oscillators  			int s0 = 0; @@ -205,7 +208,7 @@ uint32 SoundGen2GS::generateOutput() {  				}  			} -			// Multiply sample with envelope and MIDI volume information. +			// Take envelope and MIDI volume information into account.  			// Also amplify.  			s0 *= vol * g->vel/127 * 80/256;  			s1 *= vol * g->vel/127 * 80/256; @@ -379,7 +382,7 @@ void SoundGen2GS::midiNoteOn(int channel, int note, int velocity) {  	g->chn = channel;  	// Instruments can define different samples to be used based on -	// what the key is. Find the correct sample for our key. +	// what the key is. Find the correct samples for our key.  	int wa = 0;  	int wb = 0;  	while (wa < i->waveCount[0] - 1 && note > i->wave[0][wa].key) diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h index e729699bae..d60ea16d14 100644 --- a/engines/agi/sound_2gs.h +++ b/engines/agi/sound_2gs.h @@ -124,9 +124,6 @@ struct IIgsSampleHeader {  class IIgsGenerator {  public:  	IIgsGenerator() : ins(NULL), key(-1), chn(-1) {} -	void setInstrument(IIgsInstrumentHeader *ins); -	void noteOn(uint8 key, uint8 velocity); -	void noteOff();  	const IIgsInstrumentHeader *ins; ///< Currently used instrument  	int key;                   ///< MIDI key | 
