Freeware Sound Gauges - dsd_xml_sound2.gau and dsd_xml_sound3.gau. Version 2.1 - Sound termination bug removed.

These gauges represent a significant improvement (I think) over the initial sound gauge I released a year ago. The logic in both gauges has been improved, so you shouldn't hear extraneous sounds on startup. The dependency on GaugeSound.dll has been eliminated by using DirectX calls. The ability to read xml Lvars has eliminated the need for FSUIPC and the ADF2 variable.
You have two choices here. dsd_xml_sound2.gau uses a single Lvar to control all sounds. This approach is probably a little easier to implement, but does restrict you to playing (or stopping) one sound on each gauge update. dsd_xml_sound3.gau uses a separate Lvar for each sound being controlled. This approach costs a little more in clock cycles, as each Lvar must be monitored by the gauge, although the hit wasn't noticeable on my 1.4 Ghz machine.

Both of these gauges have a single RGB(0,0,0) bitmap. As such, they can be placed anywhere on your panel. Keep in mind that like most other gauges, if you put them on a panel window that isn't open at panel load time, they will be inop until the panel window is visible.

As these two gauges do essentially the same thing, you likely won't need them both in the same panel, although you are certainly not precluded from using them both at the same time.

A Word About Config Files.
Each of these gauges can (optionally) use a configuration file to customize the sounds being played, along with the Lvar(s) controlling them.
The configuration file can be specified by way of a parameter in panel.cfg, thereby allowing for as many different configurations as desired.
Neither gauge will make any modifications to the string you supply as a parameter, so you will need to ensure that you are supplying correct path infomation.
The 'GetPrivateProfileString' command that I used to read values in from the configuration files has one peculiar quirk - if you specify a filename, with no path information, if will look for that file in the main Windows directory, not the directory where the app (FS9) is running. The minute you specify a path, in front of your filename, the 'GetPrivateProfileString' command will look in your FS9 folder for the folder you have specified in the parameter.
Some examples

gauge03=dsd_xml_sound2!dsd_xml_sound2, 585,278,20,20, config_file.ini This is how not to do it. The gauge will look for config_file.ini in the Windows directory.
gauge03=dsd_xml_sound2!dsd_xml_sound2, 585,278,20,20, ./config_file.ini Placing the './' in front of the file name instructs the gauge to look in the main FS9 folder for config_file.ini
gauge03=dsd_xml_sound2!dsd_xml_sound2, 585,278,20,20, ./Gauges/dsd_xml_sound.ini This is the equivalent of the default (no parameter specified) scenario. The gauge will look in the FS9 gauges folder for the file named dsd_xml_sound.ini
gauge03=dsd_xml_sound2!dsd_xml_sound2, 585,278,20,20, D:\fs2004\Sound\Piper_sounds.ini I don't recommend this as an alternative, but it will work. Your user's FS install might not be in D:\fs2004! You would be better off with this:
gauge03=dsd_xml_sound2!dsd_xml_sound2, 585,278,20,20, .\Sound\Piper_sounds.ini Specifies that the file Piper_sounds.ini is located in the FS9\Sound folder.

Note that the '/' character and the '\' character both indicate folders in these parameter strings.
In summary, specify './' at the start of your parameter to root the string in the main FS9 folder, specify sub-folders from there.

Please read the attached instruction files for the scoop on how to make each of these gauges work - they do function quite differently, although they achieve the same thing.
They also share a common .ini file format, although there are sections of the .ini file which are uniqe to each gauge. You can safely delete stuff from the .ini file that you are not using.

These gauges are freeware - please do not include them in commercial projects of any kind without my prior consent. Please feel free to use these gauges in any freeware project you wish - you do not need special permission to do so.

Thanks go to Rob Barendregt for his patient testing of these gauges.

Please contact me if you have any questions.

Doug Dawson
douglassdawson@netscape.net
Toronto, Canada
November 23, 2004