[Scummvm-cvs-logs] CVS: scummvm/backends/midi alsa.cpp,1.20,1.21 coreaudio.cpp,1.17,1.18 quicktime.cpp,1.13,1.14 ypa1.cpp,1.12,1.13 zodiac.cpp,1.5,1.6

Eugene Sandulenko sev at users.sourceforge.net
Sat Jul 30 14:14:52 CEST 2005


Update of /cvsroot/scummvm/scummvm/backends/midi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9428/backends/midi

Modified Files:
	alsa.cpp coreaudio.cpp quicktime.cpp ypa1.cpp zodiac.cpp 
Log Message:
Remove trailing whitespaces.


Index: alsa.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/alsa.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- alsa.cpp	24 Jun 2005 15:22:29 -0000	1.20
+++ alsa.cpp	30 Jul 2005 21:10:53 -0000	1.21
@@ -90,7 +90,7 @@
 			error("Invalid port %s", var);
 			return -1;
 		}
-	} else {	
+	} else {
 		if (parse_addr(var, &seq_client, &seq_port) < 0) {
 			error("Invalid port %s", var);
 			return -1;

Index: coreaudio.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/coreaudio.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- coreaudio.cpp	2 Jul 2005 13:01:59 -0000	1.17
+++ coreaudio.cpp	30 Jul 2005 21:10:53 -0000	1.18
@@ -37,7 +37,7 @@
 
 
 // Enable the following switch to make ScummVM try to use native MIDI hardware
-// on your computer for MIDI output. This is currently quite hackish, in 
+// on your computer for MIDI output. This is currently quite hackish, in
 // particular you have no way to specify which device is used (it just always
 // uses the first output device it can find), nor is there a switch to
 // force it to use the soft synth instead of the MIDI HW.
@@ -89,8 +89,8 @@
 	int dests = MIDIGetNumberOfDestinations();
 	if (dests > 0 && mClient) {
 		mDest = MIDIGetDestination(0);
-		err = MIDIOutputPortCreate( mClient, 
-									CFSTR("scummvm_output_port"), 
+		err = MIDIOutputPortCreate( mClient,
+									CFSTR("scummvm_output_port"),
 									&mOutPort);
 	}
 #endif
@@ -99,7 +99,7 @@
 		AudioUnitConnection auconnect;
 		ComponentDescription compdesc;
 		Component compid;
-	
+
 		// Open the Music Device.
 		// We use the AudioUnit v1 API, even though it is deprecated, because
 		// this way we stay compatible with older OS X versions.
@@ -111,10 +111,10 @@
 		compdesc.componentFlagsMask = 0;
 		compid = FindNextComponent(NULL, &compdesc);
 		au_MusicDevice = static_cast<AudioUnit>(OpenComponent(compid));
-		
+
 		if (au_MusicDevice == 0)
 			error("Failed opening CoreAudio music device");
-	
+
 		// Load custom soundfont, if specified
 		// FIXME: This is kind of a temporary hack. Better (IMO) would be to
 		// query QuickTime for whatever custom soundfont was set in the
@@ -123,13 +123,13 @@
 			FSRef	fsref;
 			FSSpec	fsSpec;
 			const char *soundfont = ConfMan.get("soundfont").c_str();
-		
+
 			err = FSPathMakeRef ((const byte *)soundfont, &fsref, NULL);
-	
+
 			if (err == noErr) {
 				err = FSGetCatalogInfo (&fsref, kFSCatInfoNone, NULL, NULL, &fsSpec, NULL);
 			}
-		
+
 			if (err == noErr) {
 				err = AudioUnitSetProperty (
 					au_MusicDevice,
@@ -138,16 +138,16 @@
 					&fsSpec, sizeof(fsSpec)
 				);
 			}
-	
+
 			if (err != noErr)
 				warning("Failed loading custom sound font '%s' (error %d)\n", soundfont, err);
 		}
-	
+
 		// open the output unit
 		au_output = (AudioUnit) OpenDefaultComponent(kAudioUnitComponentType, kAudioUnitSubType_Output);
 		if (au_output == 0)
 			error("Failed opening output audio unit");
-	
+
 		// connect the units
 		auconnect.sourceAudioUnit = au_MusicDevice;
 		auconnect.sourceOutputNumber = 0;
@@ -155,20 +155,20 @@
 		err =
 			AudioUnitSetProperty(au_output, kAudioUnitProperty_MakeConnection, kAudioUnitScope_Input, 0,
 													 (void *)&auconnect, sizeof(AudioUnitConnection));
-	
+
 	#ifdef COREAUDIO_DISABLE_REVERB
 		UInt32 usesReverb = 0;
 		AudioUnitSetProperty (au_MusicDevice, kMusicDeviceProperty_UsesInternalReverb,
 			kAudioUnitScope_Global,    0, &usesReverb, sizeof (usesReverb));
 	#endif
-	
+
 		// initialize the units
 		AudioUnitInitialize(au_MusicDevice);
 		AudioUnitInitialize(au_output);
-	
+
 		// start the output
 		AudioOutputUnitStart(au_output);
-	
+
 	}
 
 	return 0;
@@ -184,7 +184,7 @@
 	} else {
 		// Stop the output
 		AudioOutputUnitStop(au_output);
-	
+
 		// Cleanup
 		CloseComponent(au_output);
 		au_output = 0;
@@ -201,15 +201,15 @@
 	if (mOutPort && mDest) {
 		MIDIPacketList packetList;
 		MIDIPacket *packet = &packetList.packet[0];
-		
+
 		packetList.numPackets = 1;
-	
+
 		packet->timeStamp = 0;
 		packet->length = 3;
 		packet->data[0] = status_byte;
 		packet->data[1] = first_byte;
 		packet->data[2] = second_byte;
-	
+
 		MIDISend(mOutPort, mDest, &packetList);
 	} else {
 		assert(au_output != NULL);
@@ -219,18 +219,18 @@
 }
 
 void MidiDriver_CORE::sysEx(byte *msg, uint16 length) {
-	
+
 	if (mOutPort && mDest) {
 		byte buf[384];
 		MIDIPacketList *packetList = (MIDIPacketList *)buf;
 		MIDIPacket *packet = packetList->packet;
 
 		assert(sizeof(buf) >= sizeof(UInt32) + sizeof(MIDITimeStamp) + sizeof(UInt16) + length + 2);
-		
+
 		packetList->numPackets = 1;
 
 		packet->timeStamp = 0;
-		
+
 		// Add SysEx frame if missing
 		if (*msg != 0xF0) {
 			packet->length = length + 2;
@@ -241,7 +241,7 @@
 			packet->length = length;
 			memcpy(packet->data, msg, length);
 		}
-	
+
 		MIDISend(mOutPort, mDest, packetList);
 	} else {
 		assert(au_output != NULL);

Index: quicktime.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/quicktime.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- quicktime.cpp	11 Jul 2005 00:48:27 -0000	1.13
+++ quicktime.cpp	30 Jul 2005 21:10:53 -0000	1.14
@@ -47,7 +47,7 @@
 class MidiDriver_QT : public MidiDriver_MPU401 {
 public:
 	MidiDriver_QT();
-	
+
 	int open();
 	void close();
 	void send(uint32 b);
@@ -62,7 +62,7 @@
 	// pitch bending so differently from MPU401.
 	uint16 _pitchbend [16];
 	byte _pitchbend_range [16];
-	
+
 	void dispose();
 };
 
@@ -109,7 +109,7 @@
 
 bail:
 	error("Init QT failed %x %x %d\n", (int)qtNoteAllocator, (int)qtNoteChannel, (int)qtErr);
-	
+
 	dispose();
 
 	return MERR_DEVICE_NOT_AVAILABLE;
@@ -206,7 +206,7 @@
 			// to +/- 12 semitones. Based on this, we first center the input data, then
 			// multiply it by a factor. If all was right, the factor would be 3/8, but for
 			// mysterious reasons the actual factor we have to use is more like 1/32 or 3/64.
-			// Maybe the QT docs are right, and 
+			// Maybe the QT docs are right, and
 			_pitchbend[chanID] = ((uint16) midiCmd[1] | (uint16) (midiCmd[2] << 7));
 			long theBend = ((long) _pitchbend[chanID] - 0x2000) * _pitchbend_range[chanID] / 32;
 

Index: ypa1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/ypa1.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ypa1.cpp	24 Jun 2005 15:22:30 -0000	1.12
+++ ypa1.cpp	30 Jul 2005 21:10:53 -0000	1.13
@@ -72,7 +72,7 @@
 	midiCmd[2] = (b & 0x00FF0000) >> 16;
 	midiCmd[1] = (b & 0x0000FF00) >> 8;
 	midiCmd[0] = (b & 0x000000FF);
-	
+
 	chanID = (midiCmd[0] & 0x0F) ;
 	mdCmd = midiCmd[0] & 0xF0;
 
@@ -80,19 +80,19 @@
 		case 0x80:	// note off
 			Pa1Lib_midiNoteOff(_midiHandle, chanID, midiCmd[1], 0);
 			break;
-	
+
 		case 0x90:	// note on
 			Pa1Lib_midiNoteOn(_midiHandle, chanID, midiCmd[1], midiCmd[2]);
 			break;
-		
+
 		case 0xB0:	// control change
 			Pa1Lib_midiControlChange(_midiHandle, chanID, midiCmd[1], midiCmd[2]);
 			break;
-		
+
 		case 0xC0:	// progam change
 			Pa1Lib_midiProgramChange(_midiHandle, chanID, midiCmd[1]);
 			break;
-		
+
 		case 0xE0:	// pitchBend
 			Pa1Lib_midiPitchBend(_midiHandle, chanID, (short)(midiCmd[1] | (midiCmd[2] << 8)));
 			break;

Index: zodiac.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/zodiac.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- zodiac.cpp	24 Jun 2005 15:22:30 -0000	1.5
+++ zodiac.cpp	30 Jul 2005 21:10:53 -0000	1.6
@@ -64,7 +64,7 @@
 	if (_isOpen) {
 		_isOpen = false;
 		MidiDriver_MPU401::close();
-		
+
 		TwMidiSetMasterVolume(_oldVol);
 		TwMidiClose(_midiHandle);
 	}
@@ -81,7 +81,7 @@
 	midiCmd[2] = (b & 0x00FF0000) >> 16;
 	midiCmd[1] = (b & 0x0000FF00) >> 8;
 	midiCmd[0] = (b & 0x000000FF);
-	
+
 	chanID = (midiCmd[0] & 0x0F) ;
 	mdCmd = midiCmd[0] & 0xF0;
 
@@ -89,19 +89,19 @@
 		case 0x80:	// note off
 			TwMidiNoteOff(_midiHandle, chanID, midiCmd[1], 0);
 			break;
-	
+
 		case 0x90:	// note on
 			TwMidiNoteOn(_midiHandle, chanID, midiCmd[1], midiCmd[2]);
 			break;
-		
+
 		case 0xB0:	// control change
 			TwMidiControlChange(_midiHandle, chanID, midiCmd[1], midiCmd[2]);
 			break;
-		
+
 		case 0xC0:	// progam change
 			TwMidiProgramChange(_midiHandle, chanID, midiCmd[1]);
 			break;
-		
+
 		case 0xE0:	// pitchBend
 			TwMidiPitchBend(_midiHandle, chanID, (short)(midiCmd[1] | (midiCmd[2] << 8)));
 			break;





More information about the Scummvm-git-logs mailing list