aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/sndres.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/saga/sndres.cpp')
-rw-r--r--engines/saga/sndres.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index 9b42443582..f03a34f2c9 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -106,11 +106,6 @@ void SndRes::setVoiceBank(int serial) {
_voiceSerial = serial;
_voiceContext = _vm->_resource->getContext(GAME_VOICEFILE, _voiceSerial);
- if (_voiceContext == NULL) {
- error("SndRes::SndRes resource context not found");
- }
-
-
}
void SndRes::playSound(uint32 resourceId, int volume, bool loop) {
@@ -129,6 +124,9 @@ void SndRes::playSound(uint32 resourceId, int volume, bool loop) {
void SndRes::playVoice(uint32 resourceId) {
SoundBuffer buffer;
+ if (!(_vm->_voiceFilesExist))
+ return;
+
if (_vm->getGameType() == GType_IHNM && !(_vm->_voicesEnabled))
return;
@@ -330,6 +328,9 @@ int SndRes::getVoiceLength(uint32 resourceId) {
double msDouble;
SoundBuffer buffer;
+ if (!(_vm->_voiceFilesExist))
+ return -1;
+
if (!load(_voiceContext, resourceId, buffer, true)) {
return -1;
}