aboutsummaryrefslogtreecommitdiff
path: root/sound/audiostream.h
diff options
context:
space:
mode:
authorMax Horn2010-01-19 00:54:06 +0000
committerMax Horn2010-01-19 00:54:06 +0000
commit69be7476212916b166ac16db41253cd367fb0dcc (patch)
treeca0d617ca86d0ceecd469a624359f1741e4fd16a /sound/audiostream.h
parent349fcd1d715091c1b1816ff610910531d5dd8544 (diff)
downloadscummvm-rg350-69be7476212916b166ac16db41253cd367fb0dcc.tar.gz
scummvm-rg350-69be7476212916b166ac16db41253cd367fb0dcc.tar.bz2
scummvm-rg350-69be7476212916b166ac16db41253cd367fb0dcc.zip
Move raw audio streams to new header sound/raw.h
svn-id: r47368
Diffstat (limited to 'sound/audiostream.h')
-rw-r--r--sound/audiostream.h70
1 files changed, 1 insertions, 69 deletions
diff --git a/sound/audiostream.h b/sound/audiostream.h
index e04ed265ab..5ce026b3d7 100644
--- a/sound/audiostream.h
+++ b/sound/audiostream.h
@@ -28,7 +28,6 @@
#include "common/util.h"
#include "common/scummsys.h"
-#include "common/stream.h"
#include "common/types.h"
#include "sound/timestamp.h"
@@ -297,70 +296,6 @@ private:
Timestamp _pos;
};
-/**
- * Creates a audio stream, which plays the given raw data.
- *
- * @param ptr Data
- * @param len Length of the data (in bytes!)
- * @param rate The sample rate of the data.
- * @param flags Flags combination.
- * @see Mixer::RawFlags
- * @return The new SeekableAudioStream (or 0 on failure).
- */
-SeekableAudioStream *makeRawMemoryStream(const byte *ptr, uint32 len, int rate, byte flags);
-
-/**
- * NOTE:
- * This API is considered deprecated.
- *
- * Factory function for a raw PCM AudioStream, which will simply treat all
- * data in the buffer described by ptr and len as raw sample data in the
- * specified format. It will then simply pass this data directly to the mixer,
- * after converting it to the sample format used by the mixer (i.e. 16 bit
- * signed native endian). Optionally supports (infinite) looping of a portion
- * of the data.
- */
-AudioStream *makeRawMemoryStream(const byte *ptr, uint32 len, int rate,
- byte flags, uint loopStart, uint loopEnd);
-
-
-/**
- * Struct used to define the audio data to be played by a RawDiskStream.
- */
-struct RawDiskStreamAudioBlock {
- int32 pos; ///< Position in stream of the block
- int32 len; ///< Length of the block (in samples)
-};
-
-/**
- * Creates a audio stream, which plays from given stream.
- *
- * @param stream Stream to play from
- * @param block Pointer to an RawDiskStreamAudioBlock array
- * @see RawDiskStreamAudioBlock
- * @param numBlocks Number of blocks.
- * @param rate The rate
- * @param len Length of the data (in bytes!)
- * @param flags Flags combination.
- * @see Mixer::RawFlags
- * @param disposeStream Whether the "stream" object should be destroyed after playback.
- * @return The new SeekableAudioStream (or 0 on failure).
- */
-SeekableAudioStream *makeRawDiskStream(Common::SeekableReadStream *stream, RawDiskStreamAudioBlock *block,
- int numBlocks, int rate, byte flags, DisposeAfterUse::Flag disposeStream);
-
-/**
- * NOTE:
- * This API is considered deprecated.
- *
- * Factory function for a Raw Disk Stream. This can stream raw PCM
- * audio data from disk. The function takes an pointer to an array of
- * RawDiskStreamAudioBlock which defines the start position and length of
- * each block of uncompressed audio in the stream.
- */
-AudioStream *makeRawDiskStream(Common::SeekableReadStream *stream, RawDiskStreamAudioBlock *block,
- int numBlocks, int rate, byte flags, DisposeAfterUse::Flag disposeStream, uint loopStart, uint loopEnd);
-
class QueuingAudioStream : public Audio::AudioStream {
public:
@@ -380,10 +315,7 @@ public:
* the buffer will be delete[]'d (so make sure to allocate them
* with new[], not with malloc).
*/
- void queueBuffer(byte *data, uint32 size, byte flags) {
- AudioStream *stream = makeRawMemoryStream(data, size, getRate(), flags, 0, 0);
- queueAudioStream(stream, DisposeAfterUse::YES);
- }
+ void queueBuffer(byte *data, uint32 size, byte flags);
/**
* Mark the stream as finished, that is, signal that no further data