Navigation

Home
About
Documentation
Screenshots
Status
Download
 
Taxipilot at
  Sourceforge




Support This Project

How to specify sounds

Different from animations, sounds are always defined in a tag of their own. The parent of the tag defines, what the given sound will be used for. All animations may have a sound, but sounds may also be defined in some other place (i.e. not directly related to an animation). The general syntax is then:

  <some_tag parameters_for_this_tag="something" ... >
    <sound file="path_to_sound/sound_file.wav" ... />
  </some_tag>

The "sound"-tag has only one mandatory attribute: "file" specifies the filename of the sound to be played.

At some placed however, two sounds may be specified using "file_a" and "file_b" as parameters. The second sound is used when an animation is played in reverse direction (e.g. the animation for the passengers teleporting is played forward for disappearing and reverse for appearing). Since generally it does not lead to the expected results to simply reverse the sound, too, in those cases you may specify a different sound to be played when the animation is reversed. At most places only one sound is needed and even at places where two sound would make sense, if you specify only one sound, that will be used for both directions of the animation. As always, having a look at the configuration-files in the distribution and their effects, may help clarify the matter.

There are four more boolean parameters, which may modify the way, the sound is played. Those parameters will only be read at places, where they make sense, however.

"continuous" specifies, whether the sound is to be played continuously. This makes sense, e.g. for the sound played while a passenger is walking, i.e. for continuous animations. It means, that the sound is looped over and over again, so you don't need to create a very long sound-file.

"repetitious" specifies, whether the sound is to be played again and again with every repetition of the animation (which obviously only makes sense for repetitious animations) in contrast to only once.

"interruptable" specifies, whether a sound can be stop in the mid of a playback-cycle, or only at the end of a playback cycle. E.g. whenever a sound is a verbal statement, it is probably better, not to interrupt it, while if it is just some noise, it may be better to interrupt it at the same time that the animation is interrupted.

"pitchable" only applies to passengers, which, as you will see may play back animations at varying rates. This attribute specifies, whether the animation too will be sped up accordingly, or whether it will not be pitched. In many cases, it is more sensible, not to speed up the sound, but try for yourself.



Last modified: Apr 03 2005 17:50 (GMT)

SourceForge Logo