diff options
-rw-r--r-- | sound/audiostream.h | 4 | ||||
-rw-r--r-- | sound/raw.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sound/audiostream.h b/sound/audiostream.h index d0051b89fb..4aad22914d 100644 --- a/sound/audiostream.h +++ b/sound/audiostream.h @@ -313,8 +313,8 @@ public: * 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); diff --git a/sound/raw.h b/sound/raw.h index 19d9e0ae6c..6c2ced0180 100644 --- a/sound/raw.h +++ b/sound/raw.h @@ -68,6 +68,11 @@ enum RawFlags { /** * 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. |