diff options
-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(); }; |