diff options
author | Max Horn | 2004-11-27 17:09:05 +0000 |
---|---|---|
committer | Max Horn | 2004-11-27 17:09:05 +0000 |
commit | c51b1266c07d3fbd1d5236a6e5d1dbc1a685203b (patch) | |
tree | 5e6e8cb3068fa30a202ed1061b3733773d3bb11c /scumm/smush/smush_mixer.cpp | |
parent | 573e02bb4cd733c97caf850b805c25d6691ba718 (diff) | |
download | scummvm-rg350-c51b1266c07d3fbd1d5236a6e5d1dbc1a685203b.tar.gz scummvm-rg350-c51b1266c07d3fbd1d5236a6e5d1dbc1a685203b.tar.bz2 scummvm-rg350-c51b1266c07d3fbd1d5236a6e5d1dbc1a685203b.zip |
Removed the (highly SCUMM specific) 'appendable stream' API from SoundMixer; SCUMM now uses the appendable stream directly
svn-id: r15919
Diffstat (limited to 'scumm/smush/smush_mixer.cpp')
-rw-r--r-- | scumm/smush/smush_mixer.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scumm/smush/smush_mixer.cpp b/scumm/smush/smush_mixer.cpp index 3c0471e178..f7309cb87e 100644 --- a/scumm/smush/smush_mixer.cpp +++ b/scumm/smush/smush_mixer.cpp @@ -93,7 +93,8 @@ bool SmushMixer::handleFrame() { delete _channels[i].chan; _channels[i].id = -1; _channels[i].chan = NULL; - _mixer->endStream(_channels[i].handle); + _channels[i].stream->finish(); + _channels[i].stream = 0; } else { int32 rate, vol, pan; bool stereo, is_16bit; @@ -119,11 +120,13 @@ bool SmushMixer::handleFrame() { } if (_mixer->isReady()) { - if (!_channels[i].handle.isActive()) - _mixer->newStream(&_channels[i].handle, rate, flags, 500000); + if (!_channels[i].handle.isActive()) { + _channels[i].stream = makeAppendableAudioStream(rate, flags, 500000); + _mixer->playInputStream(&_channels[i].handle, _channels[i].stream, false); + } _mixer->setChannelVolume(_channels[i].handle, vol); _mixer->setChannelBalance(_channels[i].handle, pan); - _mixer->appendStream(_channels[i].handle, data, size); + _channels[i].stream->append((byte *)data, size); } free(data); } @@ -139,7 +142,8 @@ bool SmushMixer::stop() { delete _channels[i].chan; _channels[i].id = -1; _channels[i].chan = NULL; - _mixer->endStream(_channels[i].handle); + _channels[i].stream->finish(); + _channels[i].stream = 0; } } return true; |