[Scummvm-cvs-logs] SF.net SVN: scummvm: [28626] scummvm/trunk/engines/agi

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Wed Aug 15 18:40:46 CEST 2007


Revision: 28626
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28626&view=rev
Author:   buddha_
Date:     2007-08-15 09:40:45 -0700 (Wed, 15 Aug 2007)

Log Message:
-----------
Removed use of USE_IIGS_SOUND (#define).

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/sound.cpp
    scummvm/trunk/engines/agi/sound.h

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2007-08-15 16:31:15 UTC (rev 28625)
+++ scummvm/trunk/engines/agi/agi.h	2007-08-15 16:40:45 UTC (rev 28626)
@@ -45,8 +45,6 @@
  * Version and other definitions
  */
 
-#define USE_IIGS_SOUND
-
 #define	TITLE		"AGI engine"
 
 #define DIR_		"dir"

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2007-08-15 16:31:15 UTC (rev 28625)
+++ scummvm/trunk/engines/agi/sound.cpp	2007-08-15 16:40:45 UTC (rev 28626)
@@ -42,8 +42,6 @@
 /* TODO: add support for variable sampling rate in the output device
  */
 
-#ifdef USE_IIGS_SOUND
-
 /** Reads an Apple IIGS envelope from then given stream. */
 bool IIgsEnvelope::read(Common::SeekableReadStream &stream) {
 	for (int segNum = 0; segNum < ENVELOPE_SEGMENT_COUNT; segNum++) {
@@ -247,8 +245,6 @@
 	return result;
 }
 
-#endif
-
 static int playing;
 static ChannelInfo chn[NUM_CHANNELS];
 static int endflag = -1;
@@ -293,8 +289,6 @@
 	-175, -172, -165, -159, -137, -114, -67, -19
 };
 
-#ifdef USE_IIGS_SOUND
-
 static uint16 period[] = {
 	1024, 1085, 1149, 1218, 1290, 1367,
 	1448, 1534, 1625, 1722, 1825, 1933
@@ -313,8 +307,6 @@
 	return 10 * (period[note % 12] >> (note / 12 - 3));
 }
 
-#endif /* USE_IIGS_SOUND */
-
 void SoundMgr::unloadSound(int resnum) {
 	if (_vm->_game.dirSound[resnum].flags & RES_LOADED) {
 		if (_vm->_game.sounds[resnum].isPlaying()) {
@@ -481,9 +473,7 @@
 		report("disabled\n");
 	}
 
-#ifdef USE_IIGS_SOUND
 	loadInstruments();
-#endif
 
 	_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
 
@@ -532,8 +522,6 @@
 	}
 }
 
-#ifdef USE_IIGS_SOUND
-
 void SoundMgr::playMidiSound() {
 	uint8 *p;
 	uint8 parm1, parm2;
@@ -600,8 +588,6 @@
 	playing = 1;
 }
 
-#endif /* USE_IIGS_SOUND */
-
 void SoundMgr::playAgiSound() {
 	int i;
 	AgiNote note;
@@ -647,14 +633,12 @@
 	if (endflag == -1)
 		return;
 
-#ifdef USE_IIGS_SOUND
 	if (chn[0].type == AGI_SOUND_MIDI) {
 		/* play_midi_sound (); */
 		playing = 0;
 	} else if (chn[0].type == AGI_SOUND_SAMPLE) {
 		playSampleSound();
 	} else
-#endif
 		playAgiSound();
 
 	if (!playing) {
@@ -745,8 +729,6 @@
 	return BUFFER_SIZE;
 }
 
-#ifdef USE_IIGS_SOUND
-
 #if 0
 void Sound::unloadInstruments() {
 	free(instruments);
@@ -938,8 +920,6 @@
 	return result;
 }
 
-#endif /* USE_IIGS_SOUND */
-
 static void fillAudio(void *udata, int16 *stream, uint len) {
 	SoundMgr *soundMgr = (SoundMgr *)udata;
 	uint32 p = 0;

Modified: scummvm/trunk/engines/agi/sound.h
===================================================================
--- scummvm/trunk/engines/agi/sound.h	2007-08-15 16:31:15 UTC (rev 28625)
+++ scummvm/trunk/engines/agi/sound.h	2007-08-15 16:40:45 UTC (rev 28626)
@@ -291,7 +291,6 @@
 	void playAgiSound();
 	uint32 mixSound();
 	bool loadInstruments();
-#ifdef USE_IIGS_SOUND
 	void playMidiSound();
 	void playSampleSound();
 	bool finalizeInstruments(Common::SeekableReadStream &uint8Wave);
@@ -300,7 +299,6 @@
 	bool loadInstrumentHeaders(const Common::String &exePath, const IIgsExeInfo &exeInfo);
 	bool convertWave(Common::SeekableReadStream &source, int16 *dest, uint length);
 	Common::MemoryReadStream *loadWaveFile(const Common::String &wavePath, const IIgsExeInfo &exeInfo);
-#endif
 };
 
 } // End of namespace Agi


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