FSXA Struggling with Doug's sound gauge...

Dutcheeseblend

Resource contributor
#1
Hi all,

I downloaded Doug Dawson's XML-sound gauge, to enhance my Fokker's cockpit with some sound. In the modeldef.xml, I added two entries (left and right slider window). This is the code for the right slider:

Code:
<PartInfo>
    <Name>FD21_door3_windowR</Name>
    <AnimLength>100</AnimLength>
    <MouseRect>
         <Cursor>Hand</Cursor>
         <TooltipText>Right slider window</TooltipText>
         <MouseFlags>LeftSingle+LeftDrag</MouseFlags>
         <CallbackCode>
            (M:Event) 'LeftSingle' scmp 0 ==
            if{ 4 (&gt;K:TOGGLE_AIRCRAFT_EXIT) 1 (&gt;L:FD21_door3_windowR,number) }
     </CallbackCode>
      </MouseRect>
</PartInfo>
I've got the corresponding ini file for the sound gauge:

Code:
[Config]
MaxSounds=2
GlobalCommands=DSDGlobals
VolumeVarIn=dsd_xml_sound_volume_in
PanVarIn=dsd_xml_sound_pan_in
VolumeVarOut=dsd_xml_sound_volume_out
PanVarOut=dsd_xml_sound_pan_out
LoopOut=dsd_xml_sound_loop_out
VolumePlayed=dsd_volume_played
PanPlayed=dsd_pan_played
LoopPlayed=dsd_loop_played

[Sounds]
Sound00=.\SimObjects\Airplanes\Fokker D.21\sound\canopy_slide.wav, 8500
Sound01=.\SimObjects\Airplanes\Fokker D.21\sound\canopy_slide.wav, 8500

[LVars]
Lvar00=FD21_door2_windowL
Lvar01=FD21_door3_windowR
The sounds are put in the appropriate folder and the files of Doug are also at the right place, and defined in the panel.cfg.

But.... It doesn't work! I don't get a sound from my slider windows. What should I do? Is there some other way to activate these sounds and play them when the slider opens or closes?

Any help would be appreciated ;)
 

ddawson

Resource contributor
#2
I think your volume specification is the issue. Use 85 instead of 8500. 85 and -8500 both represent a 15db attenuation.
 

ddawson

Resource contributor
#3
Also, the gauge does have to become "visible" at least once. Shouldn't be an issue if it is installed in the VC.
 

Dutcheeseblend

Resource contributor
#4
Thanks, changed the volume! Well, that's my experience as well: after having displayed the normal 2D cockpit view once, I can hear a sound. But it now only plays once... ???
 

Dutcheeseblend

Resource contributor
#5
Ah, now I've got one sound working! Thanks! On to the next!

BTW, I want also the sound to be triggered not only by the mouse rect (the way it is activated now in my modeldef.xml) but also after pressing Shift + E, 4, for example. I assume I should write a control gauge for this?
 

Dutcheeseblend

Resource contributor
#7
Ok, thanks for that! Is it true that every sound listed in the ini below Sounds should be unique? Or has that to do with the max number of sounds?
 

ddawson

Resource contributor
#8
The max sounds parameter does NOT have to be more than the number of sounds you are using.
If you specify the same sound more than once, it will still only be loaded once into memory, so you will be working with a single instance of the sound file.
 
#9
The max sounds parameter does NOT have to be more than the number of sounds you are using.
If you specify the same sound more than once, it will still only be loaded once into memory, so you will be working with a single instance of the sound file.
That certainly makes sense Doug. But, for example my experience was that I had max sounds 50 with 50 sounds listed and sound no.50 never played! It did when I increased the max to more than 50. Quite why this happened I couldn't say.
 

rcbarend

Resource contributor
#10
That certainly makes sense Doug. But, for example my experience was that I had max sounds 50 with 50 sounds listed and sound no.50 never played! It did when I increased the max to more than 50. Quite why this happened I couldn't say.
Just to be sure:
You do realise that if you use MaxSounds=50 that using Sound50=... doesn't work ?? Because the highest number is Sound49=.. then. (sound00 - sound49 = 50 sounds)

Rob
 
#11
Just to be sure:
You do realise that if you use MaxSounds=50 that using Sound50=... doesn't work ?? Because the highest number is Sound49=.. then. (sound00 - sound49 = 50 sounds)

Rob
Yes Rob,
I did think that was the reason. So to be sure I always keep the max number higher. That gives me some latitude to add sounds all the time.
 
Top