Re: [Widelands-public] Question about int Sound_Handler::stereo_position(const Coords)
Status: Beta
Brought to you by:
sirver
From: Erik <fr...@ho...> - 2006-01-23 16:56:13
|
Florian Weber wrote: > General side condition: if object is on the main screen, ignore all other > stereo/visibility considerations. > This could be a reasonalbe thing to do. > Averaging the different sources for the > same effect is not a good solution, I think. If we do that, we could as > well ignore stereo altogether. It's easier and will have similar effects > most of the time. > > If there are several Watchwindows placed at the right edge of the screen, showing the same object and that object produces a sound, it might be good to hear the sound from the right. Averaging the screen-x-coordinate is not that difficult (see my code example from today 08:32). > Yet another decision: should watchwindow soundFXs be affected by the > stochastic play-or-not decision (not yet implemented) or should they always > be played? > > I have not considered that since it does not even exist yet. If there is a good reason to not play a sound, that reason will probably apply even when the sound comes from a Watchwindow. But on the other hand, if a user is watching something he may be extra interested of what is happening with it. And if it produces too much sound, he could turn off the sounds from that Watchwindow. If I had to make a decision on the issue, I would not make any special case for sounds from Watchwindows, but treat it with the same rules that apply to sound from the main Mapview. >Concerning the multiple mapviews for visibility detection when working with >watchwindows: >The only way out I can see here is to let each object know whether it has a >watchwindow (and possibly about each watchwindow). This is very nontrivial, > I do not thik it is particularly difficult. Testing if a node is visible in a Watchwindow is just a matter of calling is_visible for the Mapview associated with the Watchwindow (*Watchwindow::m_mapview). Just like for the main Mapview. (See code example in the mail I sent today 08:32 for the declaration and description of is_visible and how it is used in a loop that iterates over all visible Mapviews.) The whole issue with stereo sound only becomes really difficult when trying to support multiple displays with different resolutions and a mapview on each. |