aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/coktelvideo.cpp
diff options
context:
space:
mode:
authorSven Hesse2007-08-02 16:24:04 +0000
committerSven Hesse2007-08-02 16:24:04 +0000
commit0ea88e439faded4029587143e48c475d3581838c (patch)
treeeb91a8df4b6e9768f5e11bbc1f11a2ead1904dcd /engines/gob/coktelvideo.cpp
parent8d09c1a3ade02211565a4c74ddaa72a15138f574 (diff)
downloadscummvm-rg350-0ea88e439faded4029587143e48c475d3581838c.tar.gz
scummvm-rg350-0ea88e439faded4029587143e48c475d3581838c.tar.bz2
scummvm-rg350-0ea88e439faded4029587143e48c475d3581838c.zip
Don't restart the audiostream when the IMD refills all sound buffers at once
svn-id: r28412
Diffstat (limited to 'engines/gob/coktelvideo.cpp')
-rw-r--r--engines/gob/coktelvideo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp
index 964abc8369..16df54d85f 100644
--- a/engines/gob/coktelvideo.cpp
+++ b/engines/gob/coktelvideo.cpp
@@ -257,6 +257,7 @@ void Imd::disableSound() {
delete _audioStream;
_audioStream = 0;
+ _soundStage = 0;
}
_soundEnabled = false;
_mixer = 0;
@@ -526,8 +527,9 @@ CoktelVideo::State Imd::processFrame(uint16 frame) {
_stream->read(soundBuf, dataLength);
unsignedToSigned(soundBuf, dataLength);
- _soundStage = 1;
- startSound = true;
+ if (_soundStage == 1)
+ startSound = true;
+
_audioStream->queueBuffer(soundBuf, dataLength);
} else
_stream->seek(dataLength, SEEK_CUR);