[Scummvm-devel] Streaming sounds in Scumm games

Neil Millstone neil at millstone.demon.co.uk
Thu Aug 6 00:13:35 CEST 2009


Max Horn wrote:
>
> Am 05.08.2009 um 20:55 schrieb Johannes Schickel:
>
>> Hi again,
>>
>> I did take a short look into the VOC code. It seams the transition
>> should be pretty straight forwarded. One could adapt the "makeVOCStream"
>> factory to match the ones for MP3, OGG/Vorbis and FLAC along with it
>> too. (That's an old TODO from our TODO page), this would then ease to
>> make it clear, that the code will take over the "stream" object.
>
> Yup, something like that was always the long-term plan for the various 
> sound decoder "streams": Provide a factory which takes a 
> (Seekable)ReadStream (whether it's a file or a memory stream would be 
> irrelevant), and turn it into an AudioStream. :)
>
> Just never got around to implement this everywhere properly :/.
>
I've just got one working that pretty much works for the VOCs in Sam & 
Max.  When it's finished, someone needs to take a look over it though.

Is it too late to put this in for the next release?  I could put the 
streaming on an #ifdef so it only runs on the DS port.

> Well, in the meantime, we could live with some code duplication, and 
> keep loadVOCFromStream(), while rewriting makeVOCStream() to work 
> without it.
>
> BTW, all of the above also applies to the WAVE code and 
> loadWAVFromStream(). Unfortunately, it is used in far more engines:
>   agos, gob, saga, scumm, sword1, sword2, tucker
> But I'd consider it a worthwhile quest to convert as many of these as 
> possible to use makeWAVStream
>
I might take a look at those as they cause me problems ;-)

- Neil






More information about the Scummvm-devel mailing list