[Scummvm-cvs-logs] CVS: scummvm/sound mpu401.cpp,1.21,1.22 mixer.cpp,1.127,1.128
Max Horn
fingolfin at users.sourceforge.net
Sat Oct 4 04:51:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv25712/sound
Modified Files:
mpu401.cpp mixer.cpp
Log Message:
use namespace Common a bit more; don't zero the RNG in scumm (else the seed gets reset); remove obsolete 256 color blending code
Index: mpu401.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mpu401.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- mpu401.cpp 28 Sep 2003 21:08:48 -0000 1.21
+++ mpu401.cpp 4 Oct 2003 11:50:20 -0000 1.22
@@ -126,7 +126,7 @@
return NULL;
}
-void MidiDriver_MPU401::setTimerCallback (void *timer_param, TimerProc timer_proc) {
+void MidiDriver_MPU401::setTimerCallback(void *timer_param, TimerProc timer_proc) {
if (!_timer_proc || !timer_proc) {
if (_timer_proc)
g_timer->releaseProcedure(_timer_proc);
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- mixer.cpp 18 Sep 2003 16:01:33 -0000 1.127
+++ mixer.cpp 4 Oct 2003 11:50:20 -0000 1.128
@@ -161,18 +161,18 @@
}
void SoundMixer::setupPremix(PremixProc *proc, void *param) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
_premixParam = param;
_premixProc = proc;
}
int SoundMixer::newStream(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
return insertChannel(handle, new ChannelStream(this, handle, sound, size, rate, flags, buffer_size, volume, pan));
}
void SoundMixer::appendStream(PlayingSoundHandle handle, void *sound, uint32 size) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
if (handle == 0)
return;
@@ -198,7 +198,7 @@
}
void SoundMixer::endStream(PlayingSoundHandle handle) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
// Simply ignore stop requests for handles of sounds that already terminated
if (handle == 0)
@@ -245,7 +245,7 @@
}
int SoundMixer::playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, int id, byte volume, int8 pan, uint32 loopStart, uint32 loopEnd) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
// Prevent duplicate sounds
if (id != -1) {
@@ -259,24 +259,24 @@
#ifdef USE_MAD
int SoundMixer::playMP3(PlayingSoundHandle *handle, File *file, uint32 size, byte volume, int8 pan) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
return insertChannel(handle, new ChannelMP3(this, handle, file, size, volume, pan));
}
int SoundMixer::playMP3CDTrack(PlayingSoundHandle *handle, File *file, mad_timer_t duration, byte volume, int8 pan) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
return insertChannel(handle, new ChannelMP3CDMusic(this, handle, file, duration, volume, pan));
}
#endif
#ifdef USE_VORBIS
int SoundMixer::playVorbis(PlayingSoundHandle *handle, OggVorbis_File *ov_file, int duration, bool is_cd_track, byte volume, int8 pan) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
return insertChannel(handle, new ChannelVorbis(this, handle, ov_file, duration, is_cd_track, volume, pan));
}
#endif
void SoundMixer::mix(int16 *buf, uint len) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
if (_premixProc && !_paused) {
_premixProc(_premixParam, buf, len);
@@ -302,7 +302,7 @@
}
void SoundMixer::stopAll() {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
for (int i = 0; i != NUM_CHANNELS; i++)
if (_channels[i])
_channels[i]->destroy();
@@ -314,13 +314,13 @@
return;
}
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
if (_channels[index])
_channels[index]->destroy();
}
void SoundMixer::stopID(int id) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
for (int i = 0; i != NUM_CHANNELS; i++) {
if (_channels[i] != NULL && _channels[i]->_id == id) {
_channels[i]->destroy();
@@ -330,7 +330,7 @@
}
void SoundMixer::stopHandle(PlayingSoundHandle handle) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
// Simply ignore stop requests for handles of sounds that already terminated
if (handle == 0)
@@ -348,7 +348,7 @@
}
void SoundMixer::setChannelVolume(PlayingSoundHandle handle, byte volume) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
if (handle == 0)
return;
@@ -365,7 +365,7 @@
}
void SoundMixer::setChannelPan(PlayingSoundHandle handle, int8 pan) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
if (handle == 0)
return;
@@ -391,13 +391,13 @@
return;
}
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
if (_channels[index])
_channels[index]->pause(paused);
}
void SoundMixer::pauseID(int id, bool paused) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
for (int i = 0; i != NUM_CHANNELS; i++) {
if (_channels[i] != NULL && _channels[i]->_id == id) {
_channels[i]->pause(paused);
@@ -407,7 +407,7 @@
}
void SoundMixer::pauseHandle(PlayingSoundHandle handle, bool paused) {
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
// Simply ignore pause/unpause requests for handles of sound that alreayd terminated
if (handle == 0)
@@ -429,7 +429,7 @@
// (and maybe also voice) here to work properly in iMuseDigital
// games. In the past that was achieve using the _beginSlots hack.
// Since we don't have that anymore, it's not that simple anymore.
- StackLock lock(_mutex);
+ Common::StackLock lock(_mutex);
for (int i = 0; i != NUM_CHANNELS; i++)
if (_channels[i] && !_channels[i]->isMusicChannel())
return true;
More information about the Scummvm-git-logs
mailing list