[Scummvm-devel] Unifiying MP3/Vorbis playback code some more
Joost Peters
j at 7fc1.org
Mon Dec 1 20:19:05 CET 2003
Hi,
in queen, the audio (wether compressed or not) resides in the same file
as the rest of the gamedata and you look up the offset to files (sound
or otherwise) in a lookup table by their name.
Going by what I read in this mail, I don't think it would integrate
nicely/cleanly with the proposed unification. Since, unless I don't
understand correctly, we'd need to either have a seperate file for
sfx/speech for queen (need to (re)generate 2 files + indices, instead
of just 1 we do now)...or extend the API with some *very* specific
queen code, but I think this defeats the purpose.
IMO, it's not worth the effort to mangle queen for this.
besides, it's trivial to extend the sound code in queen to support new
formats in the event that we should ever want to support another format
(I don't see this happen very often anyway)
And as for sky.. I am not 100% sure, but I think the sounds are already
'sorta compressed' with RNC. I don't think implementing mp3/ogg support
for it is going to yield enough decrease in size to be worth the
effort, especially considering the game is not that big to begin with.
Don't get me wrong; I think the unification is a good idea for
SCUMM/Simon (possibly BS2), but I don't see queen/sky benefitting from
it.
Regards,
Joost
Max Horn heeft op maandag, 1 dec 2003 om 20:01 (Europe/Amsterdam) het
volgende geschreven:
> Yo folks,
>
> was thinking about unifying some of the MP3/Vorbis code.
>
> Right now, both scumm and simon can convert the native data files into
> special MP3/Vorbis formats, unique to ScummVM. To this end we have
> tools which convert the data files of each game engine to an
> appropriate custom container format which contains the sound, MP3/Ogg
> Vorbis encoded. And both engines have code to load those files and
> then play sound from them.
>
> In both cases, the datafiles essentially contains lots of MP3/Vorbis
> files glued together, with an offset table added in. In theory, it
> should be possible to unify much of the code for that, and the data
> format could be the same, too (in fact I think it already is, but I
> didn't check on that). The API needed roughly has to:
> * load a given container file
> * fetch/play the sound data for a given sound ID
>
> I am not aware of any other need ATM, but of course we can add more
> functionality as needed.
>
> Right now I am not sure what queen needs for its MP3/Vorbis code.
> Maybe we could make an API which satisfies queen, too.
>
> At this point you may be wondering why exactly I want to unify the
> code. Well besides the obvious (we only have to maintain & fix the
> code in one place), this also makes future development easier. E.g.
> right now simon only support MP3, with this it would get Ogg Vorbis
> support "for free". And if we decide to add support for FLAC (a
> lossless audio codec), all engines using that API would gain support
> for it automatically. And we could switch to a new/better container
> format with ease, too (something which I am thinking about, too, as
> the current format is extremely limited).
>
>
>
> Thoughts? Opinions? Is this really worthwhile? Could we find a
> solution which is useful for the queen module, too? What about
> sky/sword2, could they benefit from MP3/Vorbis compression at all?
>
>
> Cheers,
>
> Max
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>
More information about the Scummvm-devel
mailing list