[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.110,1.111
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sat Aug 30 13:24:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv7293
Modified Files:
mixer.cpp
Log Message:
revert id handle stuff
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- mixer.cpp 30 Aug 2003 18:12:49 -0000 1.110
+++ mixer.cpp 30 Aug 2003 20:23:02 -0000 1.111
@@ -159,7 +159,7 @@
void SoundMixer::endStream(int index) {
StackLock lock(_mutex);
- if (index == -1)
+ if (index == 0)
return;
ChannelStream *chan;
@@ -191,7 +191,7 @@
_channels[index] = chan;
if (handle)
- *handle = index;
+ *handle = index + 1;
return index;
}
@@ -300,10 +300,10 @@
StackLock lock(_mutex);
// Simply ignore stop requests for handles of sounds that already terminated
- if (handle == -1)
+ if (handle == 0)
return;
- int index = handle;
+ int index = handle - 1;
if ((index < 0) || (index >= NUM_CHANNELS)) {
warning("soundMixer::stopHandle has invalid index %d", index);
@@ -317,10 +317,10 @@
bool SoundMixer::isChannelActive(PlayingSoundHandle handle) {
StackLock lock(_mutex);
- if (handle == -1)
+ if (handle == 0)
return false;
- int index = handle;
+ int index = handle - 1;
if ((index < 0) || (index >= NUM_CHANNELS)) {
warning("soundMixer::isChannelActive has invalid index %d", index);
return false;
@@ -388,7 +388,7 @@
delete _converter;
delete _input;
if (_handle)
- *_handle = -1;
+ *_handle = 0;
}
void Channel::destroy() {
More information about the Scummvm-git-logs
mailing list