aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJohannes Schickel2010-02-03 09:19:16 +0000
committerJohannes Schickel2010-02-03 09:19:16 +0000
commite7d5849ac88c78189eac18e7480e09b00ed5602c (patch)
tree5da3266ae27133982cfaba08b9944fcb880668c7 /sound
parent286786b6afe73f9dc790f33cd53fec14bb2939e1 (diff)
downloadscummvm-rg350-e7d5849ac88c78189eac18e7480e09b00ed5602c.tar.gz
scummvm-rg350-e7d5849ac88c78189eac18e7480e09b00ed5602c.tar.bz2
scummvm-rg350-e7d5849ac88c78189eac18e7480e09b00ed5602c.zip
Rename RawAudioStream to RawStream for consistency.
svn-id: r47844
Diffstat (limited to 'sound')
-rw-r--r--sound/decoders/raw.cpp26
-rw-r--r--sound/decoders/raw.h14
-rw-r--r--sound/decoders/voc.cpp6
3 files changed, 23 insertions, 23 deletions
diff --git a/sound/decoders/raw.cpp b/sound/decoders/raw.cpp
index 5279653db8..addad0a253 100644
--- a/sound/decoders/raw.cpp
+++ b/sound/decoders/raw.cpp
@@ -42,7 +42,7 @@ namespace Audio {
#pragma mark -
-#pragma mark --- RawAudioStream ---
+#pragma mark --- RawStream ---
#pragma mark -
/**
@@ -50,7 +50,7 @@ namespace Audio {
* It also features playback of multiple blocks from a given stream.
*/
template<bool stereo, bool is16Bit, bool isUnsigned, bool isLE>
-class RawAudioStream : public SeekableAudioStream {
+class RawStream : public SeekableAudioStream {
// Allow backends to override buffer size
#ifdef CUSTOM_AUDIO_BUFFER_SIZE
@@ -69,12 +69,12 @@ protected:
int32 _filePos; ///< Current position in stream
int32 _diskLeft; ///< Samples left in stream in current block not yet read to buffer
int32 _bufferLeft; ///< Samples left in buffer in current block
- const DisposeAfterUse::Flag _disposeAfterUse; ///< Indicates whether the stream object should be deleted when this RawAudioStream is destructed
+ const DisposeAfterUse::Flag _disposeAfterUse; ///< Indicates whether the stream object should be deleted when this RawStream is destructed
const RawStreamBlockList _blocks; ///< Audio block list
RawStreamBlockList::const_iterator _curBlock; ///< Current audio block number
public:
- RawAudioStream(int rate, DisposeAfterUse::Flag disposeStream, Common::SeekableReadStream *stream, const RawStreamBlockList &blocks)
+ RawStream(int rate, DisposeAfterUse::Flag disposeStream, Common::SeekableReadStream *stream, const RawStreamBlockList &blocks)
: _rate(rate), _playtime(0, rate), _stream(stream), _disposeAfterUse(disposeStream), _blocks(blocks), _curBlock(_blocks.begin()) {
assert(_blocks.size() > 0);
@@ -103,7 +103,7 @@ public:
}
- virtual ~RawAudioStream() {
+ virtual ~RawStream() {
if (_disposeAfterUse == DisposeAfterUse::YES)
delete _stream;
@@ -122,7 +122,7 @@ public:
};
template<bool stereo, bool is16Bit, bool isUnsigned, bool isLE>
-int RawAudioStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer, const int numSamples) {
+int RawStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer, const int numSamples) {
int oldPos = _stream->pos();
bool restoreFilePosition = false;
@@ -184,7 +184,7 @@ int RawAudioStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer,
}
template<bool stereo, bool is16Bit, bool isUnsigned, bool isLE>
-bool RawAudioStream<stereo, is16Bit, isUnsigned, isLE>::seek(const Timestamp &where) {
+bool RawStream<stereo, is16Bit, isUnsigned, isLE>::seek(const Timestamp &where) {
const uint32 seekSample = convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames();
uint32 curSample = 0;
@@ -230,11 +230,11 @@ bool RawAudioStream<stereo, is16Bit, isUnsigned, isLE>::seek(const Timestamp &wh
#define MAKE_LINEAR_DISK(STEREO, UNSIGNED) \
if (is16Bit) { \
if (isLE) \
- return new RawAudioStream<STEREO, true, UNSIGNED, true>(rate, disposeAfterUse, stream, blockList); \
+ return new RawStream<STEREO, true, UNSIGNED, true>(rate, disposeAfterUse, stream, blockList); \
else \
- return new RawAudioStream<STEREO, true, UNSIGNED, false>(rate, disposeAfterUse, stream, blockList); \
+ return new RawStream<STEREO, true, UNSIGNED, false>(rate, disposeAfterUse, stream, blockList); \
} else \
- return new RawAudioStream<STEREO, false, UNSIGNED, false>(rate, disposeAfterUse, stream, blockList)
+ return new RawStream<STEREO, false, UNSIGNED, false>(rate, disposeAfterUse, stream, blockList)
SeekableAudioStream *makeRawStream(Common::SeekableReadStream *stream,
const RawStreamBlockList &blockList,
@@ -272,7 +272,7 @@ SeekableAudioStream *makeRawStream(Common::SeekableReadStream *stream,
int rate, byte flags,
DisposeAfterUse::Flag disposeAfterUse) {
RawStreamBlockList blocks;
- RawAudioStreamBlock block;
+ RawStreamBlock block;
block.pos = 0;
const bool isStereo = (flags & Audio::FLAG_STEREO) != 0;
@@ -292,8 +292,8 @@ SeekableAudioStream *makeRawStream(const byte *buffer, uint32 size,
return makeRawStream(new Common::MemoryReadStream(buffer, size, disposeAfterUse), rate, flags, DisposeAfterUse::YES);
}
-SeekableAudioStream *makeRawDiskStream_OLD(Common::SeekableReadStream *stream, RawAudioStreamBlock *block, int numBlocks,
- int rate, byte flags, DisposeAfterUse::Flag disposeStream) {
+SeekableAudioStream *makeRawDiskStream_OLD(Common::SeekableReadStream *stream, RawStreamBlock *block, int numBlocks,
+ int rate, byte flags, DisposeAfterUse::Flag disposeStream) {
assert(numBlocks > 0);
RawStreamBlockList blocks;
for (int i = 0; i < numBlocks; ++i)
diff --git a/sound/decoders/raw.h b/sound/decoders/raw.h
index 5ef3204392..edbb108de7 100644
--- a/sound/decoders/raw.h
+++ b/sound/decoders/raw.h
@@ -65,18 +65,18 @@ enum RawFlags {
/**
- * Struct used to define the audio data to be played by a RawAudioStream.
+ * Struct used to define the audio data to be played by a RawStream.
*/
-struct RawAudioStreamBlock {
+struct RawStreamBlock {
int32 pos; ///< Position in stream of the block (in bytes of course!)
int32 len; ///< Length of the block (in sample (pairs))
};
/**
* List containing all blocks of a raw stream.
- * @see RawAudioStreamBlock
+ * @see RawStreamBlock
*/
-typedef Common::List<RawAudioStreamBlock> RawStreamBlockList;
+typedef Common::List<RawStreamBlock> RawStreamBlockList;
/**
* Creates an audio stream, which plays from the given buffer.
@@ -133,8 +133,8 @@ SeekableAudioStream *makeRawStream(Common::SeekableReadStream *stream,
* Creates a audio stream, which plays from given stream.
*
* @param stream Stream to play from
- * @param block Pointer to an RawAudioStreamBlock array
- * @see RawAudioStreamBlock
+ * @param block Pointer to an RawStreamBlock array
+ * @see RawStreamBlock
* @param numBlocks Number of blocks.
* @param rate The rate
* @param flags Flags combination.
@@ -143,7 +143,7 @@ SeekableAudioStream *makeRawStream(Common::SeekableReadStream *stream,
* @return The new SeekableAudioStream (or 0 on failure).
*/
SeekableAudioStream *makeRawDiskStream_OLD(Common::SeekableReadStream *stream,
- RawAudioStreamBlock *block, int numBlocks,
+ RawStreamBlock *block, int numBlocks,
int rate, byte flags,
DisposeAfterUse::Flag disposeStream);
diff --git a/sound/decoders/voc.cpp b/sound/decoders/voc.cpp
index 65d594d96f..9acc4430d9 100644
--- a/sound/decoders/voc.cpp
+++ b/sound/decoders/voc.cpp
@@ -180,7 +180,7 @@ byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate) {
#ifdef STREAM_AUDIO_FROM_DISK
-int parseVOCFormat(Common::SeekableReadStream& stream, RawDiskStreamAudioBlock* block, int &rate, int &loops, int &begin_loop, int &end_loop) {
+int parseVOCFormat(Common::SeekableReadStream& stream, RawStreamBlock* block, int &rate, int &loops, int &begin_loop, int &end_loop) {
VocFileHeader fileHeader;
int currentBlock = 0;
int size = 0;
@@ -302,7 +302,7 @@ int parseVOCFormat(Common::SeekableReadStream& stream, RawDiskStreamAudioBlock*
AudioStream *makeVOCDiskStream(Common::SeekableReadStream &stream, byte flags, DisposeAfterUse::Flag takeOwnership) {
const int MAX_AUDIO_BLOCKS = 256;
- RawDiskStreamAudioBlock *block = new RawDiskStreamAudioBlock[MAX_AUDIO_BLOCKS];
+ RawStreamBlock *block = new RawStreamBlock[MAX_AUDIO_BLOCKS];
int rate, loops, begin_loop, end_loop;
int numBlocks = parseVOCFormat(stream, block, rate, loops, begin_loop, end_loop);
@@ -322,7 +322,7 @@ AudioStream *makeVOCDiskStream(Common::SeekableReadStream &stream, byte flags, D
SeekableAudioStream *makeVOCDiskStreamNoLoop(Common::SeekableReadStream &stream, byte flags, DisposeAfterUse::Flag takeOwnership) {
const int MAX_AUDIO_BLOCKS = 256;
- RawDiskStreamAudioBlock *block = new RawDiskStreamAudioBlock[MAX_AUDIO_BLOCKS];
+ RawStreamBlock *block = new RawStreamBlock[MAX_AUDIO_BLOCKS];
int rate, loops, begin_loop, end_loop;
int numBlocks = parseVOCFormat(stream, block, rate, loops, begin_loop, end_loop);