Thought I'd send that out to the list, so it won't disappear like the last pieces of audio module work. (Any chance, that this code can still be submitted?)
I believe that everything started with this thread http://lists.nongnu.org/archive/html/adonthell-devel/2009-10/msg00009.html but then quickly moved to IRC. (Need to dig out the old logs, if I can find them. Part of the conversation might have occurred while at work). Anyway, this might be a good place to start and it has pointers to more information. Also, when scanning the audio code today, I've stumbled about two TODOs in there. 1) Configuration (see http://github.com/ksterker/adonthell/blob/master/src/audio/audio.cc): Config parameters can be the same we had for v0.3 for a start: channels (mono/stereo) resolution (8bit/16bit) sample-rate (11.025, 22.05, 44.1kHz) volume (0-100) An example how configuration might be handled can be found in the gfx module: http://github.com/ksterker/adonthell/blob/master/src/gfx/gfx.cc 2) Audio event serializing (http://github.com/ksterker/adonthell/blob/master/src/audio/audio_event.cc) Now, I am not sure whether we really need the ability to restore the audio system to exactly the state it had while saving the game. I guess all we really need is to know the songs/sfx currently loaded. And we need to start playing the current background music from the beginning. I assume any sfx that might be tied to map objects or GUI elements will be restored by that object/element anyway. Remain any callbacks that are registered (specifically for the background music). Those have to be saved and restored, I guess. How loading/saving works in general was partly covered here: http://lists.nongnu.org/archive/html/adonthell-devel/2009-10/msg00006.html The test script for the serializer/savegame stuff is http://github.com/ksterker/adonthell/blob/master/test/serializertest.py and that is used by worldtest too, of course: http://github.com/ksterker/adonthell/blob/master/test/worldtest.cc Examples for low level serialization are all over the place, of course. Here's the test code: http://github.com/ksterker/adonthell/blob/master/test/diskiotest.cc There are probably still a lot of questions open. We can discuss those here or on IRC. The info above should be useful nonetheless (and maybe it should make its way into the Wiki one day ...) Kai _______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/adonthell-devel