diff options
author | Max Horn | 2003-10-04 11:50:21 +0000 |
---|---|---|
committer | Max Horn | 2003-10-04 11:50:21 +0000 |
commit | d4734bd4f2963168f794691a618869ba4e558aaa (patch) | |
tree | 6881cb61298534a4966533289bb81a2f0332a4c3 /sound | |
parent | 91da08e1f3f836442c9c2ff39a9d1570f49df24d (diff) | |
download | scummvm-rg350-d4734bd4f2963168f794691a618869ba4e558aaa.tar.gz scummvm-rg350-d4734bd4f2963168f794691a618869ba4e558aaa.tar.bz2 scummvm-rg350-d4734bd4f2963168f794691a618869ba4e558aaa.zip |
use namespace Common a bit more; don't zero the RNG in scumm (else the seed gets reset); remove obsolete 256 color blending code
svn-id: r10592
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mixer.cpp | 38 | ||||
-rw-r--r-- | sound/mpu401.cpp | 2 |
2 files changed, 20 insertions, 20 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index a8d611588f..a46ad18db7 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -161,18 +161,18 @@ bool SoundMixer::bindToSystem(OSystem *syst) { } 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::appendStream(PlayingSoundHandle handle, void *sound, uint32 siz } 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::insertChannel(PlayingSoundHandle *handle, Channel *chan) { } 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 @@ int SoundMixer::playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, ui #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::mixCallback(void *s, byte *samples, int len) { } 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 @@ void SoundMixer::stopChannel(int index) { 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::stopID(int id) { } 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::stopHandle(PlayingSoundHandle handle) { } void SoundMixer::setChannelVolume(PlayingSoundHandle handle, byte volume) { - StackLock lock(_mutex); + Common::StackLock lock(_mutex); if (handle == 0) return; @@ -365,7 +365,7 @@ void SoundMixer::setChannelVolume(PlayingSoundHandle handle, byte volume) { } void SoundMixer::setChannelPan(PlayingSoundHandle handle, int8 pan) { - StackLock lock(_mutex); + Common::StackLock lock(_mutex); if (handle == 0) return; @@ -391,13 +391,13 @@ void SoundMixer::pauseChannel(int index, bool paused) { 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::pauseID(int id, bool paused) { } 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 @@ bool SoundMixer::hasActiveSFXChannel() { // (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; diff --git a/sound/mpu401.cpp b/sound/mpu401.cpp index aa798005ad..e6391016c7 100644 --- a/sound/mpu401.cpp +++ b/sound/mpu401.cpp @@ -126,7 +126,7 @@ MidiChannel *MidiDriver_MPU401::allocateChannel() { 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); |