aboutsummaryrefslogtreecommitdiff
path: root/queen/sound.cpp
diff options
context:
space:
mode:
authorMax Horn2004-02-22 14:11:16 +0000
committerMax Horn2004-02-22 14:11:16 +0000
commitaa6ec62e9db78db12912d0e48025241c5d7ef4f7 (patch)
tree0afae2b795f07b9bd1c00dc75af3dca3864dac5f /queen/sound.cpp
parent6db3a8819e7ef847f6aefac8e40f542cad006481 (diff)
downloadscummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.tar.gz
scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.tar.bz2
scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.zip
Patch #885904 (Flac Support) with some tweaks by me
svn-id: r12984
Diffstat (limited to 'queen/sound.cpp')
-rw-r--r--queen/sound.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/queen/sound.cpp b/queen/sound.cpp
index c403d32b1c..9b2d452b20 100644
--- a/queen/sound.cpp
+++ b/queen/sound.cpp
@@ -61,6 +61,14 @@ Sound *Sound::giveSound(SoundMixer *mixer, QueenEngine *vm, uint8 compression) {
return new OGGSound(mixer, vm);
#endif
break;
+ case COMPRESSION_FLAC:
+ #ifndef USE_FLAC
+ warning("Using FLAC compressed datafile, but FLAC support not compiled in");
+ return new SilentSound(mixer, vm);
+ #else
+ return new FLACSound(mixer, vm);
+ #endif
+ break;
default:
warning("Unknown compression type");
return new SilentSound(mixer, vm);
@@ -184,4 +192,11 @@ void OGGSound::sfxPlay(const char *name, bool isSpeech) {
}
#endif
+#ifdef USE_FLAC
+void FLACSound::sfxPlay(const char *name, bool isSpeech) {
+ if (_vm->resource()->fileExists(name))
+ _mixer->playFlac(isSpeech ? &_speechHandle : &_sfxHandle, _vm->resource()->giveCompressedSound(name), _vm->resource()->fileSize(name));
+}
+#endif
+
} //End of namespace Queen