[Scummvm-cvs-logs] SF.net SVN: scummvm: [26551] scummvm/trunk/sound/softsynth/ym2612.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Apr 19 22:34:34 CEST 2007


Revision: 26551
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26551&view=rev
Author:   fingolfin
Date:     2007-04-19 13:34:33 -0700 (Thu, 19 Apr 2007)

Log Message:
-----------
Patch #1701118: Remove non-english characters from ym2612.cpp

Modified Paths:
--------------
    scummvm/trunk/sound/softsynth/ym2612.cpp

Modified: scummvm/trunk/sound/softsynth/ym2612.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/ym2612.cpp	2007-04-19 20:32:11 UTC (rev 26550)
+++ scummvm/trunk/sound/softsynth/ym2612.cpp	2007-04-19 20:34:33 UTC (rev 26551)
@@ -90,15 +90,15 @@
 	_specifiedSustainRate = instrument[24] & 31;
 	_specifiedSustainLevel = (instrument[28] >> 4) & 15;
 	_specifiedReleaseRate = instrument[28] & 15;
-	_state = _s_ready; // \xCB\xDCʪ\xA4ǤϤɤ\xA6\xA4ʤΤ\xAB\xA4\xCA?
+	_state = _s_ready;
 	velocity(_velocity);
 }
 
 void Operator2612::keyOn() {
 	_state = _s_attacking;
 	_tickCount = 0;
-	_phase = 0;			// \xA4ɤ\xA6\xA4⡢\xBCºݤ\xB3\xA4\xA6\xA4餷\xA4\xA4
-	_currentLevel = ((int32)0x7f << 15); // \xA4\xB3\xA4\xEC\xA4⡢\xBCºݤ\xB3\xA4\xA6\xA4餷\xA4\xA4
+	_phase = 0;			
+	_currentLevel = ((int32)0x7f << 15); 
 }
 
 void Operator2612::keyOff() {
@@ -116,7 +116,7 @@
 	if (r != 0) {
 		r = r * 2 + (keyscaleTable[freq/262205] >> (3-_keyScale));
 		if (r >= 64)
-		r = 63; // \xA4\xB9\xA4\xEB\xA4٤\xAD\xA4ʤ\xF3\xA4\xC0\xA4\x{D926}\xA4Ȥϻפ\xA6\xA4\xF3\xA4\xC0\xA4\xB1\xA4\xC9 (\xC0\xD6p.207)
+		r = 63;
 	}
 
 	r = 63 - r;
@@ -125,7 +125,7 @@
 	else {
 		value = powtbl[(r&3) << 7];
 		value *= 1 << (r >> 2);
-		value *= 41; // r == 20 \xA4ΤȤ\xAD\xA1\xA20-96[db] \xA4\xAC 10.01[ms] == 41.00096
+		value *= 41; 
 		value /= 1 << (15 + 5);
 		value *= 127 - _specifiedTotalLevel;
 		value /= 127;
@@ -156,7 +156,7 @@
 	if (r != 0) {
 		r = r * 2 + 1;		// (Translated) I cannot know whether the timing is a good choice or not
 		r = r * 2 + (keyscaleTable[freq/262205] >> (3-_keyScale));
-		// KS \xA4ˤ\xE8\xA4\xEB\xCA\xE4\xC0\xB5\xA4Ϥ\xA2\xA4\xEB\xA4餷\xA4\xA4\xA1\xA3\xC0\xD6p.206 \xA4Ǥϵ\xAD\xBDҤ\xB5\xA4\xEC\xA4Ƥʤ\xA4\xA4\xB1\xA4ɡ\xA3
+		// KS
 		if (r >= 64)
 			r = 63;
 	}
@@ -229,11 +229,11 @@
 			}
 
 			if (level < zero_level) {
-				int phaseShift = *phasebuf >> 2; // \xC0\xB5\xA4\xB7\xA4\xA4\xCA\xD1Ĵ\xCE̤\xCF?  3 \xA4\xB8\xA4㾮\xA4\xB5\xA4\xB9\xA4\xAE\xA4\xC7 2 \xA4\xB8\xA4\xE3\xC2礭\xA4\xA4\xA4褦\xA4ʡ\xA3
+				int phaseShift = *phasebuf >> 2; 
 				if (_feedbackLevel)
 					phaseShift += (output << (_feedbackLevel - 1)) / 1024;
 				output = sintbl[((_phase >> 7) + phaseShift) & 0x7ff];
-				output >>= (level >> 18);	// \xC0\xB5\xA4\xB7\xA4\xA4\xB8\xBA\xBF\xEA\xCE̤\xCF?
+				output >>= (level >> 18);	
 				// Here is the original code, which requires 64-bit ints
 //				output *= powtbl[511 - ((level>>25)&511)];
 //				output >>= 16;
@@ -438,13 +438,13 @@
 }
 
 void Voice2612::recalculateFrequency() {
-	// MIDI \xA4Ȥ\xE2\xB0㤦\xA4\xB7....
-	// \xA4ɤ\xA6\xA4\xA4\xA4\xA6\xBB\xC5\xCDͤʤ\xF3\xA4\xC0\xA4\x{D926}\xA4\xAB?
-	// \xA4Ȼפä\xBF\xA4顢\xA4ʤ\xF3\xA4ȡ\xA2\xA4\xB3\xA4\xEC (\xA2\xAD) \xA4\xAC\xC0\xB5\xB2\xF2\xA4餷\xA4\xA4\xA1\xA3
+	// 
+	// 
+	// 
 	int32 basefreq = frequencyTable[_note];
 	int cfreq = frequencyTable[_note - (_note % 12)];
 	int oct = _note / 12;
-	int fnum = (int) (((double)basefreq * (1 << 13)) / cfreq); // OPL \xA4\xCE fnum \xA4\xC8Ʊ\xA4\xB8\xA4褦\xA4ʤ\xE2\xA4Ρ\xA3
+	int fnum = (int) (((double)basefreq * (1 << 13)) / cfreq);
 	fnum += _frequencyOffs - 0x2000;
 	if (fnum < 0x2000) {
 		fnum += 0x2000;
@@ -455,7 +455,7 @@
 		oct++;
 	}
 
-	// _frequency \xA4Ϻǽ\xAAŪ\xA4˥Х\xA4\xA5\xA2\xA5\xB9 256*1024 \xC7\xDC
+	//
 	_frequency = (int) ((frequencyTable[oct*12] * (double)fnum) / 8);
 
 	int i;
@@ -515,7 +515,7 @@
 }
 
 void MidiChannel_YM2612::controlChange(byte control, byte value) {
-	// \xA4\xA4\xA4\xA4\xA4Τ\xAB\xA4\xB3\xA4\xEC\xA4\xC7?
+	//
 	if (control == 121) {
 		// Reset controller
 		removeAllVoices();
@@ -537,7 +537,7 @@
 }
 
 void MidiChannel_YM2612::pitchBend(int16 value) {
-  // \xA4\xA4\xA4\xA4\xA4Τ\xAB\xA4\xB3\xA4\xEC\xA4\xC7?
+  //
 	Voice2612 *voice = _voices;
 	for (; voice; voice = voice->next)
 		voice->pitchBend(value);
@@ -696,8 +696,8 @@
 			0x03d5, 0x0410, 0x044e, 0x048f,
 		};
 
-		// (int)(880.0 * 256.0 * pow(2.0, (note-0x51)/12.0)); // \xA5Х\xA4\xA5\xA2\xA5\xB9 256 \xC7\xDC
-		// 0x45 \xA4\xAC 440Hz (a4)\xA1\xA20x51 \xA4\xAC 880Hz (a5) \xA4餷\xA4\xA4
+		// (int)(880.0 * 256.0 * pow(2.0, (note-0x51)/12.0))
+		// 
 		frequencyTable = new int [120];
 		for (block = -1; block < 9; block++) {
 			for (i = 0; i < 12; i++) {
@@ -707,7 +707,7 @@
 		}
 
 		keycodeTable = new int [120];
-		// detune \xCE̤η׻\xBB\xA4\xE4 KS \xA4ˤ\xE8\xA4\xEB rate \xCAѴ\xB9\xA4˻Ȥ\xA6\xA4󤸤\xE3\xA4ʤ\xA4\xA4\xAB\xA4\xCA
+		// detune 
 		for (block = -1; block < 9; block++) {
 			for (i = 0; i < 12; i++) {
 				// see p.204
@@ -730,7 +730,7 @@
 		keyscaleTable[0] = 0;
 		for (freq = 1; freq < 8192; freq++) {
 			keyscaleTable[freq] = (int)(log((double)freq) / 9.03 * 32.0) - 1;
-			// 8368[Hz] (o9c) \xA4\xC7 32\xA4\xAF\xA4餤\xA1\xA39.03 =:= ln 8368
+			// 8368[Hz] (o9c)
 		}
 	}
 


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