[Scummvm-cvs-logs] SF.net SVN: scummvm:[47437] scummvm/trunk/sound

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Jan 22 15:13:11 CET 2010


Revision: 47437
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47437&view=rev
Author:   fingolfin
Date:     2010-01-22 14:13:10 +0000 (Fri, 22 Jan 2010)

Log Message:
-----------
cleanup, typos

Modified Paths:
--------------
    scummvm/trunk/sound/audiostream.h
    scummvm/trunk/sound/raw.cpp

Modified: scummvm/trunk/sound/audiostream.h
===================================================================
--- scummvm/trunk/sound/audiostream.h	2010-01-22 14:11:33 UTC (rev 47436)
+++ scummvm/trunk/sound/audiostream.h	2010-01-22 14:13:10 UTC (rev 47437)
@@ -46,7 +46,7 @@
 
 	/**
 	 * Fill the given buffer with up to numSamples samples. Returns the actual
-	 * number of samples read, or -1 if a critical error occured (note: you
+	 * number of samples read, or -1 if a critical error occurred (note: you
 	 * *must* check if this value is less than what you requested, this can
 	 * happen when the stream is fully used up).
 	 *
@@ -86,7 +86,7 @@
 };
 
 /**
- * A rewindable audio stream. This allows for restting the AudioStream
+ * A rewindable audio stream. This allows for reseting the AudioStream
  * to its initial state. Note that rewinding itself is not required to
  * be working when the stream is being played by Mixer!
  */
@@ -101,7 +101,7 @@
 };
 
 /**
- * A looping audio stream. This object does nothing beides using
+ * A looping audio stream. This object does nothing besides using
  * a RewindableAudioStream to play a stream in a loop.
  */
 class LoopingAudioStream : public AudioStream {
@@ -141,7 +141,7 @@
  * Wrapper functionality to efficiently create a stream, which might be looped.
  *
  * Note that this function does not return a LoopingAudioStream, because it does
- * not create one, when the loop count is "1". This allows to keep the runtime
+ * not create one when the loop count is "1". This allows to keep the runtime
  * overhead down, when the code does not require any functionality only offered
  * by LoopingAudioStream.
  *
@@ -161,7 +161,7 @@
 	/**
 	 * Tries to load a file by trying all available formats.
 	 * In case of an error, the file handle will be closed, but deleting
-	 * it is still the responsibilty of the caller.
+	 * it is still the responsibility of the caller.
 	 * @param basename	a filename without an extension
 	 * @return	an SeekableAudioStream ready to use in case of success;
 	 *			NULL in case of an error (e.g. invalid/nonexisting file)
@@ -203,7 +203,7 @@
  * This automatically starts the stream at time "start"!
  *
  * Note that this function does not return a LoopingAudioStream, because it does
- * not create one, when the loop count is "1". This allows to keep the runtime
+ * not create one when the loop count is "1". This allows to keep the runtime
  * overhead down, when the code does not require any functionality only offered
  * by LoopingAudioStream.
  *
@@ -211,7 +211,7 @@
  * @param start Starttime of the stream interval to be looped
  * @param end End of the stream interval to be looped (a zero time, means till end)
  * @param loops How often to loop (0 = infinite)
- * @return A new AudioStream, which offers the desired functionallity.
+ * @return A new AudioStream, which offers the desired functionality.
  */
 AudioStream *makeLoopingAudioStream(SeekableAudioStream *stream, Timestamp start, Timestamp end, uint loops);
 
@@ -251,6 +251,7 @@
 	bool _done;
 };
 
+
 /**
  * A SubSeekableAudioStream provides access to a SeekableAudioStream
  * just in the range [start, end).

Modified: scummvm/trunk/sound/raw.cpp
===================================================================
--- scummvm/trunk/sound/raw.cpp	2010-01-22 14:11:33 UTC (rev 47436)
+++ scummvm/trunk/sound/raw.cpp	2010-01-22 14:13:10 UTC (rev 47437)
@@ -363,7 +363,7 @@
 		DisposeAfterUse::Flag autoFree,
 		int rate, byte flags,
 		uint loopStart, uint loopEnd) {
-	SeekableAudioStream *stream = makeRawMemoryStream(ptr, len, autoFree, rate, flags);
+	SeekableAudioStream *s = makeRawMemoryStream(ptr, len, autoFree, rate, flags);
 
 	const bool isStereo   = (flags & Audio::FLAG_STEREO) != 0;
 	const bool is16Bit    = (flags & Audio::FLAG_16BITS) != 0;
@@ -385,11 +385,11 @@
 		else if (is16Bit || isStereo)
 			assert((loopLen & 1) == 0 && (loopStart & 1) == 0 && (loopEnd & 1) == 0);
 
-		const uint32 extRate = stream->getRate() * (is16Bit ? 2 : 1) * (isStereo ? 2 : 1);
+		const uint32 extRate = s->getRate() * (is16Bit ? 2 : 1) * (isStereo ? 2 : 1);
 
-		return new SubLoopingAudioStream(stream, 0, Timestamp(0, loopStart, extRate), Timestamp(0, loopEnd, extRate));
+		return new SubLoopingAudioStream(s, 0, Timestamp(0, loopStart, extRate), Timestamp(0, loopEnd, extRate));
 	} else {
-		return stream;
+		return s;
 	}
 }
 
@@ -436,9 +436,9 @@
 	const bool isLooping  = (flags & Audio::FLAG_LOOP) != 0;
 
 	if (isLooping) {
-		uint loopOffset = 0, loopLen = 0;
 		const uint len = s->getLength().totalNumberOfFrames() / (is16Bit ? 2 : 1) / (isStereo ? 2 : 1);
 
+		uint loopOffset = 0, loopLen = 0;
 		if (loopEnd == 0)
 			loopEnd = len;
 		assert(loopStart <= loopEnd);
@@ -462,5 +462,4 @@
 }
 
 
-
 } // End of namespace Audio


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