[Scummvm-cvs-logs] scummvm master -> 17983508b37b3a00ca930c1bc2cf043475b51471
bluegr
bluegr at gmail.com
Thu Jun 23 20:17:41 CEST 2016
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
97c50fcfb8 SCI32: Const correction in Audio32's readBuffer() implementation
e80f1bb115 SCI32: Fix potentially uninitialized variable
17983508b3 SCI32: Fix usage of the C++11 override keyword with MSVC
Commit: 97c50fcfb88dd1ba7daefee1decc79298cbdb6ca
https://github.com/scummvm/scummvm/commit/97c50fcfb88dd1ba7daefee1decc79298cbdb6ca
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-06-23T21:07:01+03:00
Commit Message:
SCI32: Const correction in Audio32's readBuffer() implementation
Changed paths:
engines/sci/sound/audio32.cpp
engines/sci/sound/audio32.h
diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp
index 56b10c5..8dcdf79 100644
--- a/engines/sci/sound/audio32.cpp
+++ b/engines/sci/sound/audio32.cpp
@@ -233,7 +233,7 @@ int Audio32::writeAudioInternal(Audio::RewindableAudioStream *const sourceStream
// completely fill the audio buffer, the functionality of
// all these original functions is combined here and
// simplified.
-int Audio32::readBuffer(Audio::st_sample_t *const buffer, const int numSamples) {
+int Audio32::readBuffer(Audio::st_sample_t *buffer, const int numSamples) {
Common::StackLock lock(_mutex);
// The system mixer should not try to get data when
diff --git a/engines/sci/sound/audio32.h b/engines/sci/sound/audio32.h
index 59aba66..82893fb 100644
--- a/engines/sci/sound/audio32.h
+++ b/engines/sci/sound/audio32.h
@@ -185,7 +185,7 @@ private:
#pragma mark -
#pragma mark AudioStream implementation
public:
- int readBuffer(Audio::st_sample_t *const buffer, const int numSamples);
+ int readBuffer(Audio::st_sample_t *buffer, const int numSamples);
bool isStereo() const { return true; }
int getRate() const { return _mixer->getOutputRate(); }
bool endOfData() const { return _numActiveChannels == 0; }
Commit: e80f1bb115b919c95ef9efaaf089c0da3e42c33c
https://github.com/scummvm/scummvm/commit/e80f1bb115b919c95ef9efaaf089c0da3e42c33c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-06-23T21:07:27+03:00
Commit Message:
SCI32: Fix potentially uninitialized variable
Changed paths:
engines/sci/sound/audio32.cpp
diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp
index 8dcdf79..def3e4d 100644
--- a/engines/sci/sound/audio32.cpp
+++ b/engines/sci/sound/audio32.cpp
@@ -800,7 +800,7 @@ reg_t Audio32::kernelPlay(const bool autoPlay, const int argc, const reg_t *cons
bool loop;
int16 volume;
bool monitor = false;
- reg_t soundNode;
+ reg_t soundNode = NULL_REG;
if (argc >= 5) {
resourceId = ResourceId(kResourceTypeAudio36, argv[0].toUint16(), argv[1].toUint16(), argv[2].toUint16(), argv[3].toUint16(), argv[4].toUint16());
Commit: 17983508b37b3a00ca930c1bc2cf043475b51471
https://github.com/scummvm/scummvm/commit/17983508b37b3a00ca930c1bc2cf043475b51471
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-06-23T21:17:16+03:00
Commit Message:
SCI32: Fix usage of the C++11 override keyword with MSVC
MSVC does not allow the usage of the "override" keyword on function
definition, only on declaration
Changed paths:
engines/sci/sound/decoders/sol.cpp
diff --git a/engines/sci/sound/decoders/sol.cpp b/engines/sci/sound/decoders/sol.cpp
index a899cc4..e445403 100644
--- a/engines/sci/sound/decoders/sol.cpp
+++ b/engines/sci/sound/decoders/sol.cpp
@@ -118,7 +118,7 @@ SOLStream<STEREO, S16BIT>::SOLStream(Common::SeekableReadStream *stream, const D
}
template <bool STEREO, bool S16BIT>
-bool SOLStream<STEREO, S16BIT>::seek(const Audio::Timestamp &where) override {
+bool SOLStream<STEREO, S16BIT>::seek(const Audio::Timestamp &where) {
if (where != 0) {
// In order to seek in compressed SOL files, all
// previous bytes must be known since it uses
@@ -138,12 +138,12 @@ bool SOLStream<STEREO, S16BIT>::seek(const Audio::Timestamp &where) override {
}
template <bool STEREO, bool S16BIT>
-Audio::Timestamp SOLStream<STEREO, S16BIT>::getLength() const override {
+Audio::Timestamp SOLStream<STEREO, S16BIT>::getLength() const {
return _length;
}
template <bool STEREO, bool S16BIT>
-int SOLStream<STEREO, S16BIT>::readBuffer(int16 *buffer, const int numSamples) override {
+int SOLStream<STEREO, S16BIT>::readBuffer(int16 *buffer, const int numSamples) {
// Reading an odd number of 8-bit samples will result in a loss of samples
// since one byte represents two samples and we do not store the second
// nibble in this case; it should never happen in reality
@@ -167,22 +167,22 @@ int SOLStream<STEREO, S16BIT>::readBuffer(int16 *buffer, const int numSamples) o
}
template <bool STEREO, bool S16BIT>
-bool SOLStream<STEREO, S16BIT>::isStereo() const override {
+bool SOLStream<STEREO, S16BIT>::isStereo() const {
return STEREO;
}
template <bool STEREO, bool S16BIT>
-int SOLStream<STEREO, S16BIT>::getRate() const override {
+int SOLStream<STEREO, S16BIT>::getRate() const {
return _sampleRate;
}
template <bool STEREO, bool S16BIT>
-bool SOLStream<STEREO, S16BIT>::endOfData() const override {
+bool SOLStream<STEREO, S16BIT>::endOfData() const {
return _stream->eos() || _stream->pos() >= _dataOffset + _rawDataSize;
}
template <bool STEREO, bool S16BIT>
-bool SOLStream<STEREO, S16BIT>::rewind() override {
+bool SOLStream<STEREO, S16BIT>::rewind() {
return seek(0);
}
More information about the Scummvm-git-logs
mailing list