Re: [Fresco-devel] audio (and other output) support in Fresco?
Nick Lewycky <[email protected]> Thu, 03 Apr 2003 13:55:34 -0500
| Newsgroups | gmane.comp.video.fresco.devel |
|---|---|
| Message-ID | <[email protected]> |
Tobias Hunger wrote: > I don't know how the others feel, but to me sound does belong into a > modern desktop environment. We had people looking into MAS and similar > technologies, but we have not decided on wether or how to integrate > those into Fresco yet. Ok, here we go. :-) Thus far, the top of our scene graph ends with the Screen. That's great for our Graphical system. But really, these screens are usually representative of where the user is sitting. A couple of new concepts would be useful. Possibly a "User" to support things like user preferences in a smart scene graph. Hold thoughts on this, because we're not adding smarts like this to the scene graph yet. For sound, we should have a SoundStage which is responsible for sound playing, mixing, volume control and other features. So the Traversals should hold a reference to the SoundStage. There are two usage cases for the SoundStage. One is sounds associated with user action, such as clicking on something making a *kerchunk* noise. That's why there's a reference in the SoundStage in the PickTraversal, so that we can play a sound in direct response to a user action. The other is playing a sound that *isn't* associated with user action, such as an alarm clock set to go off at a later time. The alarm clock should be able to ask the Server for the SoundStage singleton and keep that reference around to use when the alarm decides it's time to ring. ((this will become more complicated if we support multiple users per Server or migration from one machine to the other, in which case, we would get the User object (since the alarm clock is tied to that person) and ask it for a reference to a SoundStage immediately before we plan to play the sound)) I'm not going to propose an exact interface for the SoundStage, though I'm sure someone could look at other sound handling systems (JACK?) and see what they do. Remember to consider issues like constant background music, priorities of different sounds, etc. Nick Lewycky