[Scummvm-devel] Recent Audio API changes

Torbjörn Andersson eriktorbjorn at telia.com
Mon Jan 11 22:03:49 CET 2010


Johannes Schickel wrote:

> For SWORD1 and SWORD2: eriktorbjorn, do you have any idea whether it's 
> possible to replace the music looping code with the new common 
> functionality? If so, do you need any help? If not, any reason why you 
> think it's not possible?

I haven't had the time to digest the mail yet. Broken Sword I and II do
pretty much the same thing from a player's point of view, but have
slightly different needs. In the first game, each song is in its own
separate WAV (or MP3, Ogg Vorbis or FLAC) file, which should be pretty
trivial to handle. In the second, they're lumped together into two large
files which, unless you've re-encoded it, uses its own compression.
(Actually, it could be some standard encoding that I just didn't
recognize at the time.) But you should still have an offset and a length
available, which ought to be enough for a stream.

Usually, only one song plays at a time, but when the music changes it's
cross-faded. I have a vague recollection that at the time I was worried
about having several open file handles to the same file because someone
said it could cause trouble on some platforms. If that's the case, can
two streams that read from the same file share the same file handle?

Torbjörn Andersson




More information about the Scummvm-devel mailing list