[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,1.60,1.61 imuse.h,1.13,1.14 sound.cpp,1.32,1.33
Pawe? Ko?odziejski
aquadran at users.sourceforge.net
Tue Oct 15 14:56:04 CEST 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv10755/scumm
Modified Files:
imuse.cpp imuse.h sound.cpp
Log Message:
changes to imuse
Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- imuse.cpp 15 Oct 2002 06:53:41 -0000 1.60
+++ imuse.cpp 15 Oct 2002 21:55:01 -0000 1.61
@@ -4997,11 +4997,18 @@
IMuseDigital::IMuseDigital(Scumm *scumm) {
memset(_channel, 0, sizeof(channel) * MAX_DIGITAL_CHANNELS);
_scumm = scumm;
+ for (int32 l = 0; l < MAX_DIGITAL_CHANNELS; l++) {
+ _channel[l]._mixerTrack = -1;
+ }
+ _scumm->_mixer->beginSlots(MAX_DIGITAL_CHANNELS + 1);
_scumm->_timer->installProcedure(imus_digital_handler, 200);
_pause = false;
}
IMuseDigital::~IMuseDigital() {
+ for (int32 l = 0; l < MAX_DIGITAL_CHANNELS; l++) {
+ _scumm->_mixer->stop(l);
+ }
_scumm->_timer->releaseProcedure(imus_digital_handler);
}
@@ -5406,7 +5413,6 @@
if (_channel[l]._toBeRemoved == true) {
_channel[l]._used = false;
free(_channel[l]._data);
- memset(&_channel[l], 0, sizeof(channel));
continue;
}
@@ -5507,16 +5513,11 @@
}
}
-
if (_channel[l]._mixerTrack == -1) {
- _channel[l]._mixerTrack = _scumm->_mixer->playStream(NULL, -1, buf, mixer_size,
- _channel[l]._freq, _channel[l]._mixerFlags);
- continue;
- } else if (_scumm->_mixer->_channels[_channel[l]._mixerTrack] == NULL) {
- _channel[l]._mixerTrack = _scumm->_mixer->playStream(NULL, -1, buf, mixer_size,
- _channel[l]._freq, _channel[l]._mixerFlags);
+ _channel[l]._mixerTrack = _scumm->_mixer->playStream(NULL, l, buf, mixer_size,
+ _channel[l]._freq, _channel[l]._mixerFlags, -1, 800000);
} else {
- _scumm->_mixer->append(_channel[l]._mixerTrack, buf, mixer_size,
+ _scumm->_mixer->append(l, buf, mixer_size,
_channel[l]._freq, _channel[l]._mixerFlags);
}
}
@@ -5550,7 +5551,6 @@
if (READ_UINT32_UNALIGNED(ptr) == MKID('Crea')) {
_channel[l]._bits = 8;
_channel[l]._channels = 2;
- _channel[l]._mixerTrack = -1;
_channel[l]._mixerSize = (22050 / 5) * 2;
_channel[l]._mixerFlags = SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_STEREO | SoundMixer::FLAG_REVERSE_STEREO | SoundMixer::FLAG_UNSIGNED;
byte * t_ptr= _scumm->_sound->readCreativeVocFile(ptr, size, _channel[l]._freq, _channel[l]._numLoops);
@@ -5624,6 +5624,11 @@
if (tag == MKID_BE('DATA')) break;
}
+ if ((sound == 123) || (sound == 122)) {
+ _channel[l]._isJump = false;
+ _channel[l]._numJumps = 0;
+ }
+
uint32 header_size = ptr - s_ptr;
_channel[l]._offsetStop -= header_size;
if (_channel[l]._bits == 12) {
@@ -5646,7 +5651,6 @@
}
}
}
- _channel[l]._mixerTrack = -1;
_channel[l]._mixerSize = (22050 / 5) * 2;
_channel[l]._mixerFlags = SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_STEREO | SoundMixer::FLAG_REVERSE_STEREO;
if (_channel[l]._bits == 12) {
Index: imuse.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- imuse.h 15 Oct 2002 06:53:41 -0000 1.13
+++ imuse.h 15 Oct 2002 21:55:02 -0000 1.14
@@ -61,7 +61,7 @@
IMuseInternal *_imuse; // Pointer to the real imuse object
};
-#define MAX_DIGITAL_CHANNELS 16
+#define MAX_DIGITAL_CHANNELS 8
#define MAX_IMUSE_JUMPS 1
#define MAX_IMUSE_REGIONS 3
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- sound.cpp 15 Oct 2002 06:53:41 -0000 1.32
+++ sound.cpp 15 Oct 2002 21:55:02 -0000 1.33
@@ -943,7 +943,7 @@
if (_musicBundleToBeRemoved == true) {
_scumm->_timer->releaseProcedure(&music_handler);
_nameBundleMusic = NULL;
- _scumm->_mixer->stopChannel(_bundleMusicTrack);
+ _scumm->_mixer->stop(_bundleMusicTrack);
_bundleMusicTrack = -1;
if (_musicBundleBufFinal) {
free(_musicBundleBufFinal);
@@ -1033,8 +1033,8 @@
uint32 final_size = decode12BitsSample(ptr, &buffer, size);
if (_bundleMusicTrack == -1) {
- _bundleMusicTrack = _scumm->_mixer->playStream(NULL, -1, buffer, final_size, rate,
- SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_16BITS | SoundMixer::FLAG_STEREO, -1);
+ _bundleMusicTrack = _scumm->_mixer->playStream(NULL, _scumm->_mixer->_beginSlots - 1, buffer, final_size, rate,
+ SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_16BITS | SoundMixer::FLAG_STEREO, -1, 800000);
} else {
_scumm->_mixer->append(_bundleMusicTrack, buffer, final_size, rate,
SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_16BITS | SoundMixer::FLAG_STEREO);
More information about the Scummvm-git-logs
mailing list