aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2010-01-31 02:11:41 +0000
committerMax Horn2010-01-31 02:11:41 +0000
commit21e1cc4cf8b79a9f59e911514c52831113356f7c (patch)
tree492c457f3469acd863e7623bc2fa4a410458f706 /sound
parent7f4aa161bcb0f989fe2b343909fd855679901d3e (diff)
downloadscummvm-rg350-21e1cc4cf8b79a9f59e911514c52831113356f7c.tar.gz
scummvm-rg350-21e1cc4cf8b79a9f59e911514c52831113356f7c.tar.bz2
scummvm-rg350-21e1cc4cf8b79a9f59e911514c52831113356f7c.zip
Switch makeADPCMStream to DisposeAfterUse::Flag
svn-id: r47736
Diffstat (limited to 'sound')
-rw-r--r--sound/decoders/adpcm.cpp10
-rw-r--r--sound/decoders/adpcm.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/sound/decoders/adpcm.cpp b/sound/decoders/adpcm.cpp
index 7a15f118b3..4566dd78bd 100644
--- a/sound/decoders/adpcm.cpp
+++ b/sound/decoders/adpcm.cpp
@@ -34,7 +34,7 @@ namespace Audio {
class ADPCMInputStream : public RewindableAudioStream {
private:
Common::SeekableReadStream *_stream;
- bool _disposeAfterUse;
+ DisposeAfterUse::Flag _disposeAfterUse;
int32 _startpos;
int32 _endpos;
int _channels;
@@ -82,7 +82,7 @@ private:
int16 decodeTinsel(int16, double);
public:
- ADPCMInputStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign);
+ ADPCMInputStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign);
~ADPCMInputStream();
int readBuffer(int16 *buffer, const int numSamples);
@@ -114,7 +114,7 @@ public:
// In addition, also MS IMA ADPCM is supported. See
// <http://wiki.multimedia.cx/index.php?title=Microsoft_IMA_ADPCM>.
-ADPCMInputStream::ADPCMInputStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign)
+ADPCMInputStream::ADPCMInputStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign)
: _stream(stream), _disposeAfterUse(disposeAfterUse), _channels(channels), _type(type), _blockAlign(blockAlign), _rate(rate) {
if (type == kADPCMMSIma && blockAlign == 0)
@@ -142,7 +142,7 @@ ADPCMInputStream::ADPCMInputStream(Common::SeekableReadStream *stream, bool disp
}
ADPCMInputStream::~ADPCMInputStream() {
- if (_disposeAfterUse)
+ if (_disposeAfterUse == DisposeAfterUse::YES)
delete _stream;
}
@@ -626,7 +626,7 @@ int16 ADPCMInputStream::decodeTinsel(int16 code, double eVal) {
return (int16) CLIP<double>(sample, -32768.0, 32767.0);
}
-RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
+RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
return new ADPCMInputStream(stream, disposeAfterUse, size, type, rate, channels, blockAlign);
}
diff --git a/sound/decoders/adpcm.h b/sound/decoders/adpcm.h
index 46ccb582c3..7452478f35 100644
--- a/sound/decoders/adpcm.h
+++ b/sound/decoders/adpcm.h
@@ -75,7 +75,7 @@ enum typesADPCM {
*/
RewindableAudioStream *makeADPCMStream(
Common::SeekableReadStream *stream,
- bool disposeAfterUse,
+ DisposeAfterUse::Flag disposeAfterUse,
uint32 size, typesADPCM type,
int rate = 22050,
int channels = 2,