[Scummvm-devel] Streaming sounds in Scumm games

Neil Millstone neil at millstone.demon.co.uk
Sat Aug 8 03:42:54 CEST 2009


Eugene Sandulenko wrote:
> 2009/8/6 Neil Millstone <neil at millstone.demon.co.uk>:
>   
>> 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.
>>     
> If the code will be finely reviewed, I see no problem with it, since
> it will be easy to test and detect any regressions.
>
>
> Eugene
>
> PS. I am afraid to take a look at my backlog of the tracker tickets,
> but plan to do it today/tomorrow. I do not know current situation with
> the release as my daily job sucked all time. Hope that we're still
> fine and there are not too many blockers.
>
>   
I've submitted my patch for VOC audio streaming:
https://sourceforge.net/tracker/?func=detail&aid=2834001&group_id=37116&atid=418822

New behavior is disabled by default, enable it by defining 
STREAM_AUDIO_FROM_DISK preprocessor symbol.

It contains:
- A new object which can stream uncompressed audio from a file, 
supporting sample data which can be in chunks spread across the file
- Code which parses a VOC file to create the chunk list for the 
streaming object
- A patch to the Kyra engine so it doesn't delete the stream immediately.

Tested in Kyra and Scumm engines, on DS and Linux SDL ports.  I'll be 
testing other engines in due course.

Saves a large chunk of memory when VOC speech is being used, and also 
improves performance (at least on my DS port).

Comments and suggestions welcome!

Thanks,

- Neil










More information about the Scummvm-devel mailing list