[Scummvm-cvs-logs] SF.net SVN: scummvm:[43467] scummvm/trunk/engines/saga/sound.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Aug 17 13:11:38 CEST 2009
Revision: 43467
http://scummvm.svn.sourceforge.net/scummvm/?rev=43467&view=rev
Author: thebluegr
Date: 2009-08-17 11:11:38 +0000 (Mon, 17 Aug 2009)
Log Message:
-----------
Ignore speech and sound effect samples with unknown compression, instead of trying to play them as raw sound. Some cleanup
Modified Paths:
--------------
scummvm/trunk/engines/saga/sound.cpp
Modified: scummvm/trunk/engines/saga/sound.cpp
===================================================================
--- scummvm/trunk/engines/saga/sound.cpp 2009-08-17 11:06:27 UTC (rev 43466)
+++ scummvm/trunk/engines/saga/sound.cpp 2009-08-17 11:11:38 UTC (rev 43467)
@@ -84,12 +84,10 @@
flags |= Audio::Mixer::FLAG_UNSIGNED;
if (!buffer.isCompressed) {
- if (handleType == kVoiceHandle)
- _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
- else
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
+ Audio::Mixer::SoundType soundType = (handleType == kVoiceHandle) ?
+ Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType;
+ _mixer->playRaw(soundType, handle, buffer.buffer,
+ buffer.size, buffer.frequency, flags, -1, volume);
} else {
Audio::AudioStream *stream = 0;
@@ -110,13 +108,8 @@
break;
#endif
default:
- // No compression, play it as raw sound
- if (handleType == kVoiceHandle)
- _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
- else
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
+ // Unknown compression, ignore sample
+ warning("Unknown compression, ignoring sound");
break;
}
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