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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Jan 22 15:14:30 CET 2010


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

Log Message:
-----------
Clarify that all blocks of raw audio data are assumed to come from malloc()

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

Modified: scummvm/trunk/sound/audiostream.h
===================================================================
--- scummvm/trunk/sound/audiostream.h	2010-01-22 14:13:10 UTC (rev 47437)
+++ scummvm/trunk/sound/audiostream.h	2010-01-22 14:14:28 UTC (rev 47438)
@@ -313,8 +313,8 @@
 	 * Queue a block of raw audio data for playback. This stream
 	 * will play all queued buffers, in the order they were
 	 * queued. After all data contained in them has been played,
-	 * the buffer will be delete[]'d (so make sure to allocate them
-	 * with new[], not with malloc).
+	 * the buffer will be released using free(). So make sure to
+	 * allocate them with malloc(), not with new[]).
 	 */
 	void queueBuffer(byte *data, uint32 size, DisposeAfterUse::Flag disposeAfterUse, byte flags);
 

Modified: scummvm/trunk/sound/raw.h
===================================================================
--- scummvm/trunk/sound/raw.h	2010-01-22 14:13:10 UTC (rev 47437)
+++ scummvm/trunk/sound/raw.h	2010-01-22 14:14:28 UTC (rev 47438)
@@ -68,6 +68,11 @@
 /**
  * Creates a audio stream, which plays the given raw data.
  *
+ * The data pointer is assumed to have been allocated with malloc().
+ * In particular, if autofreeBuffer is set to DisposeAfterUse::YES,
+ * then this buffer will be deallocated using free(). So do not
+ * use a buffer allocated with new[]!
+ *
  * @param ptr Data
  * @param len Length of the data (in bytes!)
  * @param rate The sample rate of the data.


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