[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_mixer.cpp,1.16,1.17 smush_mixer.h,1.3,1.4 smush_player.cpp,1.46,1.47 smush_player.h,1.8,1.9
Pawel Kolodziejski
aquadran at users.sourceforge.net
Mon Sep 1 06:44:09 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.36,1.37 imuse_digi.h,1.7,1.8 sound.cpp,1.213,1.214 sound.h,1.43,1.44
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.113,1.114 mixer.h,1.45,1.46
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv15606/scumm/smush
Modified Files:
smush_mixer.cpp smush_mixer.h smush_player.cpp smush_player.h
Log Message:
added sound handle stuff to mixer streams
Index: smush_mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- smush_mixer.cpp 31 Aug 2003 20:26:20 -0000 1.16
+++ smush_mixer.cpp 1 Sep 2003 13:43:21 -0000 1.17
@@ -35,14 +35,13 @@
for (int32 i = 0; i < SoundMixer::NUM_CHANNELS; i++) {
_channels[i].id = -1;
_channels[i].chan = NULL;
- _channels[i].mixer_index = -1;
+ _channels[i].mixer_index = 0;
}
}
SmushMixer::~SmushMixer() {
for (int32 i = 0; i < SoundMixer::NUM_CHANNELS; i++) {
- if (_channels[i].mixer_index != -1)
- _mixer->stop(_channels[i].mixer_index);
+ _mixer->stop(_channels[i].mixer_index);
}
}
@@ -72,7 +71,7 @@
if (_channels[i].chan == NULL || _channels[i].id == -1) {
_channels[i].chan = c;
_channels[i].id = track;
- _channels[i].mixer_index = -1;
+ _channels[i].mixer_index = 0;
_nextIndex = i + 1;
return true;
}
@@ -82,7 +81,7 @@
if (_channels[i].chan == NULL || _channels[i].id == -1) {
_channels[i].chan = c;
_channels[i].id = track;
- _channels[i].mixer_index = -1;
+ _channels[i].mixer_index = 0;
_nextIndex = i + 1;
return true;
}
@@ -109,8 +108,7 @@
delete _channels[i].chan;
_channels[i].id = -1;
_channels[i].chan = NULL;
- if (_channels[i].mixer_index != -1)
- _mixer->endStream(_channels[i].mixer_index);
+ _mixer->endStream(_channels[i].mixer_index);
} else {
int32 rate;
bool stereo, is_short;
@@ -136,8 +134,8 @@
}
if (_silentMixer == false) {
- if (_channels[i].mixer_index == -1) {
- _channels[i].mixer_index = _mixer->newStream(data, size, rate, flags, 500000, 127, 0);
+ if (_channels[i].mixer_index == 0) {
+ _mixer->newStream(&_channels[i].mixer_index, data, size, rate, flags, 500000, 127, 0);
} else {
_mixer->appendStream(_channels[i].mixer_index, data, size);
}
Index: smush_mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- smush_mixer.h 21 Jun 2003 20:40:34 -0000 1.3
+++ smush_mixer.h 1 Sep 2003 13:43:22 -0000 1.4
@@ -32,7 +32,7 @@
struct {
int id;
SmushChannel *chan;
- int mixer_index;
+ PlayingSoundHandle mixer_index;
} _channels[SoundMixer::NUM_CHANNELS];
int _nextIndex;
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- smush_player.cpp 31 Aug 2003 20:26:20 -0000 1.46
+++ smush_player.cpp 1 Sep 2003 13:43:22 -0000 1.47
@@ -227,7 +227,7 @@
_storeFrame = false;
_width = 0;
_height = 0;
- _IACTchannel = -1;
+ _IACTchannel = 0;
_IACTpos = 0;
_soundFrequency = 22050;
_speed = speed;
@@ -290,10 +290,7 @@
_base = NULL;
}
- if (_IACTchannel != -1) {
- _scumm->_mixer->stop(_IACTchannel);
- _IACTchannel = -1;
- }
+ _scumm->_mixer->stop(_IACTchannel);
_scumm->_insaneState = false;
_scumm->abortCutscene();
@@ -461,8 +458,8 @@
}
} while (--count);
- if (_IACTchannel == -1) {
- _IACTchannel = _scumm->_mixer->newStream(output_data, 0x1000, 22050,
+ if (_IACTchannel == 0) {
+ _scumm->_mixer->newStream(&_IACTchannel, output_data, 0x1000, 22050,
SoundMixer::FLAG_STEREO | SoundMixer::FLAG_16BITS, 200000, 127, 0);
} else {
_scumm->_mixer->appendStream(_IACTchannel, output_data, 0x1000);
Index: smush_player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- smush_player.h 20 Jun 2003 11:21:53 -0000 1.8
+++ smush_player.h 1 Sep 2003 13:43:22 -0000 1.9
@@ -51,7 +51,7 @@
bool _skips[37];
int32 _frame;
- int _IACTchannel;
+ PlayingSoundHandle _IACTchannel;
byte _IACToutput[4096];
int32 _IACTpos;
bool _storeFrame;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.36,1.37 imuse_digi.h,1.7,1.8 sound.cpp,1.213,1.214 sound.h,1.43,1.44
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.113,1.114 mixer.h,1.45,1.46
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list