[Scummvm-cvs-logs] SF.net SVN: scummvm:[55014] scummvm/trunk/engines/hugo/sound.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Wed Dec 22 19:25:48 CET 2010


Revision: 55014
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55014&view=rev
Author:   strangerke
Date:     2010-12-22 18:25:48 +0000 (Wed, 22 Dec 2010)

Log Message:
-----------
HUGO: Replace function comments by doxygen comments

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/sound.cpp

Modified: scummvm/trunk/engines/hugo/sound.cpp
===================================================================
--- scummvm/trunk/engines/hugo/sound.cpp	2010-12-22 17:51:07 UTC (rev 55013)
+++ scummvm/trunk/engines/hugo/sound.cpp	2010-12-22 18:25:48 UTC (rev 55014)
@@ -179,17 +179,16 @@
 	byte volume, ch = (byte)(b & 0xF);
 	debugC(9, kDebugMusic, "MidiPlayer::send, channel %d (volume is %d)", ch, _channelsVolume[ch]);
 	switch (b & 0xFFF0) {
-	case 0x07B0: // volume change
+	case 0x07B0:                                    // volume change
 		volume = (byte)((b >> 16) & 0x7F);
 		_channelsVolume[ch] = volume;
 		volume = volume * _masterVolume / 255;
 		b = (b & 0xFF00FFFF) | (volume << 16);
         debugC(8, kDebugMusic, "Volume change, channel %d volume %d", ch, volume);
 		break;
-	case 0x7BB0: // all notes off
+	case 0x7BB0:                                    // all notes off
         debugC(8, kDebugMusic, "All notes off, channel %d", ch);
-		if (!_channelsTable[ch]) {
-			// channel not yet allocated, no need to send the event
+		if (!_channelsTable[ch]) {                  // channel not yet allocated, no need to send the event
 			return;
 		}
 		break;
@@ -207,7 +206,7 @@
 
 void MidiPlayer::metaEvent(byte type, byte *data, uint16 length) {
 	switch (type) {
-	case 0x2F: // end of Track
+	case 0x2F:                                      // end of Track
 		if (_isLooping) {
 			_parser->jumpToTick(0);
 		} else {
@@ -237,31 +236,40 @@
 	delete _midiPlayer;
 }
 
+/**
+* Set the FM music volume from config.mvolume (0..100%)
+*/
 void SoundHandler::setMusicVolume() {
-	/* Set the FM music volume from config.mvolume (0..100%) */
-
 	_midiPlayer->setVolume(_config.musicVolume * 255 / 100);
 }
 
+/**
+* Stop any sound that might be playing
+*/
 void SoundHandler::stopSound() {
-	/* Stop any sound that might be playing */
 	_vm->_mixer->stopAll();
 }
 
+/**
+* Stop any tune that might be playing
+*/
 void SoundHandler::stopMusic() {
-	/* Stop any tune that might be playing */
 	_midiPlayer->stop();
 }
 
+/**
+* Turn music on and off
+*/
 void SoundHandler::toggleMusic() {
-// Turn music on and off
 	_config.musicFl = !_config.musicFl;
 
 	_midiPlayer->pause(!_config.musicFl);
 }
 
+/**
+* Turn digitized sound on and off
+*/
 void SoundHandler::toggleSound() {
-// Turn digitized sound on and off
 	_config.soundFl = !_config.soundFl;
 }
 
@@ -269,9 +277,10 @@
 	_midiPlayer->play(seq_p, size);
 }
 
-
+/**
+* Read a tune sequence from the sound database and start playing it
+*/
 void SoundHandler::playMusic(int16 tune) {
-	/* Read a tune sequence from the sound database and start playing it */
 	sound_pt seqPtr;                                // Sequence data from file
 	uint16 size;                                    // Size of sequence data
 
@@ -283,11 +292,11 @@
 	}
 }
 
-
+/**
+* Produce various sound effects on supplied stereo channel(s)
+* Override currently playing sound only if lower or same priority
+*/
 void SoundHandler::playSound(int16 sound, stereo_t channel, byte priority) {
-	/* Produce various sound effects on supplied stereo channel(s) */
-	/* Override currently playing sound only if lower or same priority */
-
 	// uint32 dwVolume;                             // Left, right volume of sound
 	sound_pt sound_p;                               // Sound data
 	uint16 size;                                    // Size of data
@@ -314,9 +323,10 @@
 
 }
 
+/**
+* Initialize for MCI sound and midi
+*/
 void SoundHandler::initSound() {
-	/* Initialize for MCI sound and midi */
-
 	_midiPlayer->open();
 }
 


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