aboutsummaryrefslogtreecommitdiff
path: root/insane.cpp
diff options
context:
space:
mode:
authorJames Brown2002-05-12 16:53:13 +0000
committerJames Brown2002-05-12 16:53:13 +0000
commit0d60185a8839bbc1f6a49697b54784f71f08f34a (patch)
tree387f1b20ce0ed077e463e3ded7324cb2de458d2d /insane.cpp
parent38af71139fd98202d0e6888968e8e2f19c61ecce (diff)
downloadscummvm-rg350-0d60185a8839bbc1f6a49697b54784f71f08f34a.tar.gz
scummvm-rg350-0d60185a8839bbc1f6a49697b54784f71f08f34a.tar.bz2
scummvm-rg350-0d60185a8839bbc1f6a49697b54784f71f08f34a.zip
Add new mixer 'append' function to allow pseudo-streaming for SMUSH
svn-id: r4291
Diffstat (limited to 'insane.cpp')
-rw-r--r--insane.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/insane.cpp b/insane.cpp
index a9788d036b..3126ce8272 100644
--- a/insane.cpp
+++ b/insane.cpp
@@ -36,6 +36,7 @@ void invalidblock(uint32 tag)
}
int _frameChanged;
+int _mixer_num;
uint32 SmushPlayer::nextBE32()
{
@@ -645,8 +646,7 @@ void SmushPlayer::parseFOBJ()
void SmushPlayer::parsePSAD() // FIXME: Needs to append to
{ // a sound buffer
unsigned int pos, sublen, tag, idx, trk;
- byte * buf;
-
+ byte * buf;
pos = 0;
trk = READ_LE_UINT16(_cur + pos); /* FIXME: is this correct ? */
@@ -712,10 +712,8 @@ void SmushPlayer::parsePSAD() // FIXME: Needs to append to
debug(3, "trk %d: SDAT part len 0x%x rate %d",
trk, sublen, _strkRate[idx]);
- g_scumm->_mixer->play_raw(NULL, buf,
- sublen, _strkRate[idx],
- SoundMixer::FLAG_UNSIGNED |
- SoundMixer::FLAG_AUTOFREE);
+ g_scumm->_mixer->append(idx, buf, sublen,
+ _strkRate[idx], SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
break;
case 'SMRK' :
_psadTrk[idx] = 0;
@@ -808,6 +806,7 @@ void SmushPlayer::init()
_renderBitmap = sm->_videoBuffer;
codec37_init(&pcd37, 320, 200);
+ _mixer_num = -1;
memset(_saudSize, 0, sizeof(_saudSize));
memset(_saudSubSize, 0, sizeof(_saudSubSize));
memset(_psadTrk, 0, sizeof(_psadTrk));