Sound Gauge: dsd_xml_sound2.gau

This gauge uses a single xml Lvar to accept commands to play sounds. The Lvar used, and the sounds to be played, can be specified in a text based initialization file. The path to and name of the initialization file can be specified as a paramter in the gauge's entry in panel.cfg - a different configuration is therefore possible for every panel the gauge is used in.
The gauge will behave according to the following values read by the Lvar:

00 ~ 99 These values will trigger a 'play once' instance of the sound with the corresponding id number

100 ~ 199 These values will trigger a 'looping' instance of the sound with the corresponding id number. Setting the Lvar with the same value a second time will stop the looping sound.

-1 ~ -99 These values will stop either a looping or play once sound.

250 This value will stop all sounds the gauge is currently playing.

260 This is the normal 'resting' value for the Lvar. The gauge will reset the Lvar to this value after is executes each sound operation. If you are going to be issuing sound operations in rapid succession, particularly from multiple xml gauges, you should probably check the Lvar for a value of 260 before setting it to a new value. This gauge is only capable of accepting one sound command on each gauge update - if the Lvar is updated more than once on a given gauge update, only one value will be detected by the sound gauge.

Default values
Initialization File: Located in the Gauges folder, named dsd_xml_sound.ini. Note that the use of an initialization file is not required. In the absence of such a file, the gauge will use default values for Lvar and sound file locations and names. These defaults are:
Lvar: dsd_xml_sound_id

File names: dsd_xml_xx.wav, where xx represents the associated id number, which you will set the Lvar to in order to play the sound.
File locations: \Sound\dsd (Folder 'dsd' contained in the main FS 'Sound' folder)


Syntax examples:
gauge03=dsd_xml_sound2!dsd_xml_sound2, 2,2,5, 5, Default setting. Gauge will look in 'Gauges' folder for dsd_xml_sound.ini, and will read that file if found. If not, default values will be used for Lvar and sound file names.

gauge03=dsd_xml_sound2!dsd_xml_sound2, 2,2,5, 5, .\Gauges\jet_sounds.cfg Gauge will load the values from the file 'jet_sounds.cfg' if found in the Gauges folder. Defaults loaded otherwise.

gauge03=dsd_xml_sound2!dsd_xml_sound2, 2,2,5, 5, .\Aircraft\b737_400\boeing_sounds.dat Gauge will look in the main folder for the default 737, for a file called boeing_sounds.dat. Again, if the file isn't found, default values will be used.

The gauge checks for the existence of a sound file before attempting to play it. If the file is not found, the gauge will take no further action, but it won't crash the sim!

The attached sample file 'dsd_xml_sound.ini' is laid out for use with both this gauge and with dsd_xml_sound3.gau. This gauge wil ignore the entire section headed [LVars] in addition to the MaxSounds and LvarStop entries in the [Config] section. These entries are used only by dsd_xml_sound3.gau and may be safely deleted if you are not using that gauge.