scummvm/scummvm — pull request #110 by lordhoto (2011-10-21 23:10:44+00:00)
Title: Implementation of VOC as AudioStream

Instead of the rather hacky (and hard to maintain) way of VOC handling before, I started to implement some basic VocStream class. This should allow for a much easier implementation of features like silence and looping (and maybe even VOC chunks with different samples rates if we ever run into that).

This would allow us to get rid of the VOC streaming code, which uses the feature of RAW streams to consist of multiple chunks. In fact this is the *only* code using this feature, so this could be stripped out and thus make the RAW stream code a bit more leight-weight.

With some more work we could get of the loadVOCFromStream function too, but SAGA uses it and I'm not familiar with its resource handling so I can't say how easy it would be to adapt SAGA to use the new interface.

Of course now the VOC code will always stream from the read stream passed. This might have odd effects, in case engine authors relied on the stream not to be changed after the initial makeVOCStream call. It would be nice if engine authors, which take use of the VOC code, could check whether this causes any problems for them.

This pull request is a discussion request, it should not be merged without prior discussion with me.