[Scummvm-cvs-logs] SF.net SVN: scummvm: [28979] scummvm/trunk/engines/lure/sound.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Thu Sep 20 06:13:37 CEST 2007
Revision: 28979
http://scummvm.svn.sourceforge.net/scummvm/?rev=28979&view=rev
Author: eriktorbjorn
Date: 2007-09-19 21:13:37 -0700 (Wed, 19 Sep 2007)
Log Message:
-----------
I'm probably being overly paranoid, but I'm nervous about initializing an array
of boolean with memset(). Maybe it's perfectly fine and healthy, but using a
loop is consistent with how we do it in killSounds() anyway.
Modified Paths:
--------------
scummvm/trunk/engines/lure/sound.cpp
Modified: scummvm/trunk/engines/lure/sound.cpp
===================================================================
--- scummvm/trunk/engines/lure/sound.cpp 2007-09-20 04:09:55 UTC (rev 28978)
+++ scummvm/trunk/engines/lure/sound.cpp 2007-09-20 04:13:37 UTC (rev 28979)
@@ -35,6 +35,7 @@
namespace Lure {
SoundManager::SoundManager() {
+ int index;
_descs = Disk::getReference().getEntry(SOUND_DESC_RESOURCE_ID);
_numDescs = _descs->size() / sizeof(SoundDescResource);
_soundData = NULL;
@@ -42,7 +43,8 @@
int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
_nativeMT32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));
- memset(_channelsInUse, false, NUM_CHANNELS_OUTER);
+ for (index = 0; index < NUM_CHANNELS_OUTER; ++index)
+ _channelsInUse[index] = false;
_driver = MidiDriver::createMidi(midiDriver);
int statusCode = _driver->open();
@@ -54,7 +56,7 @@
if (_nativeMT32)
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
- for (int index = 0; index < NUM_CHANNELS_INNER; ++index) {
+ for (index = 0; index < NUM_CHANNELS_INNER; ++index) {
_channelsInner[index].midiChannel = _driver->allocateChannel();
_channelsInner[index].volume = DEFAULT_VOLUME;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list