diff options
author | James Brown | 2003-01-24 06:41:10 +0000 |
---|---|---|
committer | James Brown | 2003-01-24 06:41:10 +0000 |
commit | 5f7cd1c93d0d1cc600e634173610fbdc8ab82d69 (patch) | |
tree | d6ff54e45963d70b88c7e1a5c266e68196e707d2 /scumm/sound.cpp | |
parent | c1930e0ff52af45366060881edb085cc3b9fdb4c (diff) | |
download | scummvm-rg350-5f7cd1c93d0d1cc600e634173610fbdc8ab82d69.tar.gz scummvm-rg350-5f7cd1c93d0d1cc600e634173610fbdc8ab82d69.tar.bz2 scummvm-rg350-5f7cd1c93d0d1cc600e634173610fbdc8ab82d69.zip |
LCA'03 commit: Fix talking where no sound hardware is present
svn-id: r6536
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index bc72f183a5..9a7b6b941c 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -416,8 +416,8 @@ void Sound::processSfxQueues() { if (_scumm->_vars[_scumm->VAR_TALK_ACTOR]) { //_sfxMode & 2) { act = _scumm->_vars[_scumm->VAR_TALK_ACTOR]; - if (_talkChannel < 0) - finished = false; + if (_talkChannel < 1) + finished = true; else if (_scumm->_mixer->_channels[_talkChannel] == NULL) { finished = true; } else @@ -772,6 +772,9 @@ int Sound::startSfxSound(File *file, int file_size) { int rate, comp; byte *data; + if (_scumm->_noDigitalSamples) + return -1; + if (file_size > 0) { int alloc_size = file_size; #ifdef USE_MAD @@ -1136,7 +1139,10 @@ void Sound::bundleMusicHandler(Scumm * scumm) { int Sound::playBundleSound(char *sound) { byte * ptr; bool result; - + + if (_scumm->_noDigitalSamples) + return -1; + if (_scumm->_gameId == GID_CMI) { char voxfile[20]; sprintf(voxfile, "voxdisk%d.bun", _scumm->_vars[_scumm->VAR_CURRENTDISK]); @@ -1238,7 +1244,7 @@ int Sound::playSfxSound(void *sound, uint32 size, uint rate, bool isUnsigned) { int Sound::playSfxSound_MP3(void *sound, uint32 size) { #ifdef USE_MAD - if (_soundsPaused) + if (_soundsPaused || _scumm->_noDigitalSamples) return -1; return _scumm->_mixer->playMP3(NULL, sound, size, SoundMixer::FLAG_AUTOFREE); #endif @@ -1309,7 +1315,7 @@ static ov_callbacks data_wrap = { int Sound::playSfxSound_Vorbis(void *sound, uint32 size) { #ifdef USE_VORBIS - if (_soundsPaused) + if (_soundsPaused || _scumm->_noDigitalSamples) return -1; OggVorbis_File *ov_file = new OggVorbis_File; |