from adonthell import audio
audio.init("sdl")
a = audio.sound("/opt/ut2004/Music/KR-Ghosts-of-Anubis.ogg")
b = audio.sound("/usr/share/gcompris/boards/sounds/level.ogg")
a.play()
b.play()
a.stop()
Right now I'm starting to look at how to integrate this better with the rest of the code. For example, I know we don't want to be passing full path names to load sounds. I think there is enough examples to pull from that I should be able to figure this out on my own. But I do have a couple questions.
One, I want to make sure that the end audio API is consistent with the "vision" (TM). I've looked through the wiki and some of the other documentation and I haven't found anything specific. So what I'm heading towards is an API that let's you control playing/manipulating sounds. Basically the low-level stuff you would need to implement some of the other ideas that are around. Right now I'm envisioning something similar to above, with a few added pieces. (event at the end of a sound, positional location, and a caching mechanism come to mind) Am I already way off track?
Two, I started adding an way to hook to an event on the end of the sound. I found to base event classes. one in event/event.h and one in input/event.h. I wasn't sure if I was supposed to use the one in event, or do the same thing input does and create my own event base class.
All for now,
Tyler
_______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/adonthell-devel