[Scummvm-git-logs] scummvm master -> 82815658f2819f395d467cdfdd748f15ca82dbf6

dreammaster dreammaster at scummvm.org
Sat Feb 11 03:57:43 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
82815658f2 TITANIC: Fix further warnings in CWaveFile


Commit: 82815658f2819f395d467cdfdd748f15ca82dbf6
    https://github.com/scummvm/scummvm/commit/82815658f2819f395d467cdfdd748f15ca82dbf6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-02-10T21:57:35-05:00

Commit Message:
TITANIC: Fix further warnings in CWaveFile

Changed paths:
    engines/titanic/sound/wave_file.cpp
    engines/titanic/sound/wave_file.h


diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp
index 53cbc86..4a9f64b 100644
--- a/engines/titanic/sound/wave_file.cpp
+++ b/engines/titanic/sound/wave_file.cpp
@@ -63,13 +63,13 @@ bool AudioBufferStream::endOfData() const {
 
 /*------------------------------------------------------------------------*/
 
-CWaveFile::CWaveFile() : _soundManager(nullptr), _audioStream(nullptr),
+CWaveFile::CWaveFile() : _audioStream(nullptr),
 		_waveData(nullptr), _waveSize(0), _dataSize(0), _headerSize(0),
 		_rate(0), _flags(0), _wavType(0), _soundType(Audio::Mixer::kPlainSoundType) {
 	setup();
 }
 
-CWaveFile::CWaveFile(QSoundManager *owner) : _soundManager(owner), _audioStream(nullptr),
+CWaveFile::CWaveFile(QSoundManager *owner) : _audioStream(nullptr),
 		_waveData(nullptr), _waveSize(0), _dataSize(0), _headerSize(0),
 		_rate(0), _flags(0), _wavType(0), _soundType(Audio::Mixer::kPlainSoundType) {
 	setup();
@@ -164,12 +164,12 @@ bool CWaveFile::loadMusic(CAudioBuffer *buffer, DisposeAfterUse::Flag disposeAft
 	return true;
 }
 
-void CWaveFile::load(byte *data, uint size) {
+void CWaveFile::load(byte *data, uint dataSize) {
 	_waveData = data;
-	_waveSize = size;
+	_waveSize = dataSize;
 
 	// Parse the wave header
-	Common::MemoryReadStream wavStream(data, size, DisposeAfterUse::NO);
+	Common::MemoryReadStream wavStream(data, dataSize, DisposeAfterUse::NO);
 	Audio::loadWAVFromStream(wavStream, _dataSize, _rate, _flags, &_wavType);
 	_headerSize = wavStream.pos();
 }
diff --git a/engines/titanic/sound/wave_file.h b/engines/titanic/sound/wave_file.h
index 991ba26..6bd1898 100644
--- a/engines/titanic/sound/wave_file.h
+++ b/engines/titanic/sound/wave_file.h
@@ -44,7 +44,6 @@ private:
 	int _rate;
 	byte _flags;
 	uint16 _wavType;
-	QSoundManager *_soundManager;
 	Audio::SeekableAudioStream *_audioStream;
 private:
 	/**
@@ -55,7 +54,7 @@ private:
 	/**
 	 * Gets passed the raw data for the wave file
 	 */
-	void load(byte *data, uint size);
+	void load(byte *data, uint dataSize);
 public:
 	Audio::Mixer::SoundType _soundType;
 





More information about the Scummvm-git-logs mailing list