diff options
author | Bastien Bouclet | 2017-11-11 13:24:01 +0100 |
---|---|---|
committer | Bastien Bouclet | 2017-11-11 13:26:22 +0100 |
commit | 443211d9ff31446ce5187ec1dc969f5629fac402 (patch) | |
tree | 322858c93a6cf37d9b20db4c4f04d73f6b71ccab | |
parent | 08f9e05b15e34886ff37962dd73169c26033ffb7 (diff) | |
download | scummvm-rg350-443211d9ff31446ce5187ec1dc969f5629fac402.tar.gz scummvm-rg350-443211d9ff31446ce5187ec1dc969f5629fac402.tar.bz2 scummvm-rg350-443211d9ff31446ce5187ec1dc969f5629fac402.zip |
SWORD25: Add a constructor to initialize SoundHandle members
Fixes #7018
-rw-r--r-- | engines/sword25/sfx/soundengine.cpp | 14 | ||||
-rw-r--r-- | engines/sword25/sfx/soundengine.h | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp index 46f27b06f0..8bc20180af 100644 --- a/engines/sword25/sfx/soundengine.cpp +++ b/engines/sword25/sfx/soundengine.cpp @@ -65,9 +65,6 @@ SoundEngine::SoundEngine(Kernel *pKernel) : ResourceService(pKernel) { _mixer = g_system->getMixer(); _maxHandleId = 1; - - for (int i = 0; i < SOUND_HANDLES; i++) - _handles[i].type = kFreeHandle; } bool SoundEngine::init(uint sampleRate, uint channels) { @@ -394,5 +391,16 @@ bool SoundEngine::unpersist(InputPersistenceBlock &reader) { return reader.isGood(); } +SndHandle::SndHandle() : + type(kFreeHandle), + id(0), + sndType(-1), + volume(0), + pan(0), + loop(false), + loopStart(0), + loopEnd(0), + layer(0) { +} } // End of namespace Sword25 diff --git a/engines/sword25/sfx/soundengine.h b/engines/sword25/sfx/soundengine.h index 9bf251be15..9b4b329be5 100644 --- a/engines/sword25/sfx/soundengine.h +++ b/engines/sword25/sfx/soundengine.h @@ -73,6 +73,8 @@ struct SndHandle { int32 loopStart; int32 loopEnd; uint32 layer; + + SndHandle(); }; |