aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-12-22 19:03:32 +0000
committerMax Horn2003-12-22 19:03:32 +0000
commit73f10cd5900b2544aa46d3a7b810b7b6bb2ba2a5 (patch)
tree0ea3a632747c234691c527d1a8d9b9efdb020339 /scumm
parent1605103a066ae458b95c5a7ad130ca7b130a32ce (diff)
downloadscummvm-rg350-73f10cd5900b2544aa46d3a7b810b7b6bb2ba2a5.tar.gz
scummvm-rg350-73f10cd5900b2544aa46d3a7b810b7b6bb2ba2a5.tar.bz2
scummvm-rg350-73f10cd5900b2544aa46d3a7b810b7b6bb2ba2a5.zip
fix for bug #864478 (Smush audio streaming); cleanup
svn-id: r11855
Diffstat (limited to 'scumm')
-rw-r--r--scumm/smush/smush_mixer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scumm/smush/smush_mixer.cpp b/scumm/smush/smush_mixer.cpp
index 157a9457d2..10bc983960 100644
--- a/scumm/smush/smush_mixer.cpp
+++ b/scumm/smush/smush_mixer.cpp
@@ -70,7 +70,7 @@ void SmushMixer::addChannel(SmushChannel *c) {
}
for (i = 0; i < NUM_CHANNELS; i++) {
- if (_channels[i].chan == NULL || _channels[i].id == -1) {
+ if ((_channels[i].chan == NULL || _channels[i].id == -1) && _channels[i].handle == 0) {
_channels[i].chan = c;
_channels[i].id = track;
_channels[i].handle = 0;
@@ -99,14 +99,14 @@ bool SmushMixer::handleFrame() {
_mixer->endStream(_channels[i].handle);
} else {
int32 rate;
- bool stereo, is_short;
+ bool stereo, is_16bit;
void *data;
- _channels[i].chan->getParameters(rate, stereo, is_short);
+ _channels[i].chan->getParameters(rate, stereo, is_16bit);
int32 size = _channels[i].chan->availableSoundData();
byte flags = stereo ? SoundMixer::FLAG_STEREO : 0;
- if (is_short) {
+ if (is_16bit) {
data = malloc(size * (stereo ? 2 : 1) * 4);
_channels[i].chan->getSoundData((int16 *)data, size);
size *= stereo ? 4 : 2;