[Scummvm-devel] Streaming sounds in Scumm games

Neil Millstone neil at millstone.demon.co.uk
Wed Aug 5 18:24:39 CEST 2009


Hi ScummVM team!

Today, I've been following up on an old bug report from a user on my DS 
port.  They mention that in Sam and Max there is no audio when Conroy 
Bumpus sings his song in Bumpusville.  Looking into this I notice that 
the game attempts to load a VOC file of just over 2Mb into RAM in 
Audio::makeVOCStream().  This doesn't work on the DS, which has 
somewhere in the region of 2Mb heap in total for the entire game.  If 
the game could be made to stream this audio from disk rather than 
loading it all into RAM, this part of the game would work. 

I've been looking into this, and it looks doable, but it quite a big 
change, and I'm not familiar with all the code involved.  The audio 
stream would need to keep a copy of the data file's stream, and be able 
to read and write this without affecting other parts of the code doing 
disk access to the same file.  I don't see a simple clean way of doing 
this currently.

Is anyone interested in doing this?  If we had a generic stream object 
which could stream uncompressed audio from disk, we would be able to use 
it in other games, many of which could also have their memory footprint 
reduced by this.  It would also help all platforms with slow disk access 
to stream data rather than read it all in at once.

Thanks for any help!

- Neil







More information about the Scummvm-devel mailing list