<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://www.fsdeveloper.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GaugeSound.dll</id>
	<title>GaugeSound.dll - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.fsdeveloper.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GaugeSound.dll"/>
	<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;action=history"/>
	<updated>2026-06-01T13:23:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8313&amp;oldid=prev</id>
		<title>N4gix at 00:20, 6 April 2012</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8313&amp;oldid=prev"/>
		<updated>2012-04-06T00:20:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:20, 5 April 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot;&gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	case PANEL_SERVICE_PRE_INITIALIZE:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  	case PANEL_SERVICE_PRE_INITIALIZE:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; 		rtu1_bg_element = (PELEMENT_STATIC_IMAGE)pgauge-&amp;gt;elements_list[0];&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8312&amp;oldid=prev</id>
		<title>N4gix: New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | FS2000 = false | FS98 = false }}  If you wish to use the GaugeSound.dll in your ...</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8312&amp;oldid=prev"/>
		<updated>2012-04-06T00:19:44Z</updated>

		<summary type="html">&lt;p&gt;New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | FS2000 = false | FS98 = false }}  If you wish to use the GaugeSound.dll in your ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you wish to use the GaugeSound.dll in your gauge(s), the first step is to declare the following in your main gauge (.cpp) file:&lt;br /&gt;
&lt;br /&gt;
 // Sound declarations&lt;br /&gt;
 	typedef VOID (*TGaugePlaySound)(LPTSTR,LPSTR,int);&lt;br /&gt;
 	typedef VOID (*TGaugeStopSound)(LPTSTR);&lt;br /&gt;
 	typedef VOID (*TTerminateSounds)();&lt;br /&gt;
 	TGaugePlaySound GaugePlaySound;&lt;br /&gt;
 	TGaugeStopSound GaugeStopSound;&lt;br /&gt;
 	TTerminateSounds TerminateSounds;&lt;br /&gt;
 	HMODULE MGaugeSound;&lt;br /&gt;
 &lt;br /&gt;
 	// If you need to &amp;quot;loop&amp;quot; some sounds, define the &amp;quot;stop loop string names&amp;quot;&lt;br /&gt;
 	LPSTR flap = &amp;quot;flap&amp;quot;;&lt;br /&gt;
 	LPSTR gearhorn = &amp;quot;gearhorn&amp;quot;;&lt;br /&gt;
 	LPSTR overspeed = &amp;quot;overspeed&amp;quot;;&lt;br /&gt;
 	LPSTR firetest = &amp;quot;firetest&amp;quot;;&lt;br /&gt;
 	LPSTR geartest = &amp;quot;geartest&amp;quot;;&lt;br /&gt;
 	LPSTR speedtest = &amp;quot;speedtest&amp;quot;;&lt;br /&gt;
 	LPSTR warning = &amp;quot;warning&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Next, initialize the following in the PANEL_SERVICE_PRE_INITIALIZE case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_INITIALIZE:&lt;br /&gt;
 		rtu1_bg_element = (PELEMENT_STATIC_IMAGE)pgauge-&amp;gt;elements_list[0];&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
Next, add the following to the PANEL_SERVICE_PRE_UPDATE case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_UPDATE:&lt;br /&gt;
 		MGaugeSound = GetModuleHandle(&amp;quot;GaugeSound&amp;quot;);&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Finally, add this to the PANEL_SERVICE_PRE_KILL case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_KILL:&lt;br /&gt;
 		MGaugeSound = GetModuleHandle(&amp;quot;GaugeSound&amp;quot;);&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
 		(TerminateSounds)();&lt;br /&gt;
 		FreeLibrary(MGaugeSound);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
To play a sound, use one of the following examples in a mouse callback. Note that &amp;quot;PathName&amp;quot; is the sub-folder name in the default FS ..\Sound folder, e.g., ..\Sound\Milviz. &amp;quot;SoundName&amp;quot; is for example push.wav:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Play once:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
     (GaugePlaySound)(&amp;quot;sound\\PathName\\SoundName.wav&amp;quot;,&amp;quot;&amp;quot;,0) ; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Loop Sound:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Looping a sound continuously require that you specify a &amp;quot;stop loop string name&amp;quot; and set the third parameter to 1 (0 = play once, 1 = loop continuously).&lt;br /&gt;
&lt;br /&gt;
      if ( *rotartest == 2 ) &lt;br /&gt;
           { (GaugePlaySound)(&amp;quot;soundesdggearhorn.wav&amp;quot;,geartest,1) ; } &lt;br /&gt;
      else { (GaugeStopSound)(geartest); }&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
</feed>