[Scummvm-cvs-logs] SF.net SVN: scummvm:[51708] scummvm/trunk
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Tue Aug 3 20:19:25 CEST 2010
Revision: 51708
http://scummvm.svn.sourceforge.net/scummvm/?rev=51708&view=rev
Author: athrxx
Date: 2010-08-03 18:19:25 +0000 (Tue, 03 Aug 2010)
Log Message:
-----------
KYRA/TOWNS: replace some music stops with fadeouts (based on original code)
Modified Paths:
--------------
scummvm/trunk/engines/kyra/sound_lok.cpp
scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_audio.cpp
Modified: scummvm/trunk/engines/kyra/sound_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_lok.cpp 2010-08-03 17:09:27 UTC (rev 51707)
+++ scummvm/trunk/engines/kyra/sound_lok.cpp 2010-08-03 18:19:25 UTC (rev 51708)
@@ -49,16 +49,14 @@
_lastMusicCommand = -1;
if (_flags.platform == Common::kPlatformFMTowns) {
- if (command == 1) {
- _sound->beginFadeOut();
- } else if (command >= 35 && command <= 38) {
+ if (command >= 35 && command <= 38) {
snd_playSoundEffect(command - 20);
} else if (command >= 2) {
if (_lastMusicCommand != command)
// the original does -2 here we handle this inside _sound->playTrack()
_sound->playTrack(command);
} else {
- _sound->haltTrack();
+ _sound->beginFadeOut();
}
_lastMusicCommand = command;
} else if (_flags.platform == Common::kPlatformPC98) {
Modified: scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_audio.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_audio.cpp 2010-08-03 17:09:27 UTC (rev 51707)
+++ scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_audio.cpp 2010-08-03 18:19:25 UTC (rev 51708)
@@ -101,8 +101,8 @@
TownsAudioInterface::TownsAudioInterface(Audio::Mixer *mixer, TownsAudioInterfacePluginDriver *driver) : TownsPC98_FmSynth(mixer, kTypeTowns),
_fmInstruments(0), _pcmInstruments(0), _pcmChan(0), _waveTables(0), _waveTablesTotalDataSize(0),
- _baserate(55125.0f / (float)mixer->getOutputRate()), _tickLength(0), _timer(0), _drv(driver),
- _musicVolume(256), _sfxVolume(256), _pcmSfxChanMask(0), _ready(false) {
+ _baserate(55125.0f / (float)mixer->getOutputRate()), _tickLength(0), _timer(0), _drv(driver), _pcmSfxChanMask(0),
+ _musicVolume(Audio::Mixer::kMaxMixerVolume), _sfxVolume(Audio::Mixer::kMaxMixerVolume), _ready(false) {
#define INTCB(x) &TownsAudioInterface::intf_##x
static const TownsAudioIntfCallback intfCb[] = {
@@ -257,6 +257,9 @@
}
int TownsAudioInterface::callback(int command, ...) {
+ if (!_ready)
+ return 1;
+
va_list args;
va_start(args, command);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list