aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/anim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lab/anim.cpp')
-rw-r--r--engines/lab/anim.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index bb5c5e9e88..c5493e03e6 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -668,48 +668,4 @@ bool Anim::readDiff(byte *buffer, bool playOnce) {
return true;
}
-void Anim::readSound(bool waitTillFinished, Common::File *file) {
- uint32 magicBytes = file->readUint32LE();
- if (magicBytes != 1219009121L)
- return;
-
- uint32 soundTag = file->readUint32LE();
- uint32 soundSize = file->readUint32LE();
-
- if (soundTag == 0)
- file->skip(soundSize); // skip the header
- else
- return;
-
- while (soundTag != 65535) {
- _vm->_music->updateMusic();
- soundTag = file->readUint32LE();
- soundSize = file->readUint32LE() - 8;
-
- if ((soundTag == 30) || (soundTag == 31)) {
- if (waitTillFinished) {
- while (_vm->_music->isSoundEffectActive()) {
- _vm->_music->updateMusic();
- _vm->waitTOF();
- }
- }
-
- file->skip(4);
-
- uint16 sampleRate = file->readUint16LE();
- file->skip(2);
- byte *soundData = (byte *)malloc(soundSize);
- file->read(soundData, soundSize);
- _vm->_music->playSoundEffect(sampleRate, soundSize, soundData);
- } else if (soundTag == 65535L) {
- if (waitTillFinished) {
- while (_vm->_music->isSoundEffectActive()) {
- _vm->_music->updateMusic();
- _vm->waitTOF();
- }
- }
- } else
- file->skip(soundSize);
- }
-}
} // End of namespace Lab