Jump to content
Sign in to follow this  
Guest pauld2004

help needed with XML sound v2

Recommended Posts

Guest pauld2004

Hi there,This is my first attempt at xml and I am quite lost. I would like to program a gauge that will play a sound (via Doug Dawson's XML sound 2) when the following conditions are met :1. Aircraft on ground2. autobrake RTO3. Ground speed >=10 knotsthis sound must also only play once.Can anyone please help me to get started.thanks in advancePaul

Share this post


Link to post
Share on other sites

Hi Paul,Since your trigger to play the sound is not a one-time trigger but a static condition, you have to introduce some kind of state to allow the sound to be played once-only.E.g.: (not tested, but should work) (A:Auto brake switch cb, enum) 0 == (A:SIM ON GROUND,bool) (A:GROUND VELOCITY,knots) 10 > && && if{ (G:Var1) 0 == if{ 1 (>G:Var1) 1 (>L:PAUL_RTO_WARNING,number) } } els{ 0 (>G:Var1) } and, in the .ini file of Doug's sound gauge (use name PaulsSounds.ini or alike), define:[Config]MaxSounds=1Lvar=dsd_xml_sound_idLvarStop=Paul_AllSoundsStop[sounds]Sound00=./Sound/YourSoundFile.wav[LVars]Lvar00=PAUL_RTO_WARNINGThis assumes of course, that your warning sound is only a short sound that does NOT have to be stopped prematurely. Also possible, but with different code ..And use dsd_xml_sound3.gau (rename it to avoid conflicts with other designers), because that allows you to define your own L: variables for each sound. E.g. to PaulsSounds.gau.So the panel.cfg definition becomes:gauge**=PaulsGauges!RTO_Warning, 0,0gauge**=PaulsSounds!dsd_xml_sound3, 0,0,,, ./gauges/PaulsGauges/PaulsSounds.iniwith files PaulsSounds.ini and RTO_Warning.xml in the folder /gauges/PaulsGauges/ and file PaulsSounds.gau in the /gauges/ folder.I cannot be more helpfull for a new XML designer :-)Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites
Guest pauld2004

Hi Rob,Thanks for your help! I've written my own xml gauge now based on your example.One question: If I go into spot view and then return to cockpit, the sounds don't work anymore. Any idea why?regardsPaul

Share this post


Link to post
Share on other sites

Paul,I'm beginning to suspect a bug in the gauge code. I will do some testing over the next day or two to see if I can nail it down...Doug Dawson

Share this post


Link to post
Share on other sites

I'm having trouble getting this to work. I assume it's probably a configuration issue on my end, but it seems straight forward enough. Maybe someone can tell what might be going wrong. I'm using the ...sound2.gauDoug's Gauge:-----------Renamed "dsd_xml_sound2.gau" to "sound.gau" and placed in directory"./Gauges/my_aircraft" along with all my other gauges.Panel.cfg entry:------------------gauge16=my_aircraft!sound, 2,2,5,5, ./Aircraft/my_aircraft/Sound/Panel/Panel_Sound.cfgSettings file:renamed "dsd_xml_sound.ini" to "Panel_Sound.cfg" and placed in directory ./Aircraft/my_aircraft/Sound/Panel along with all my panel sound files.Panel_Sound.cfg file:--------------------Ommited all entries except [Config] and [sounds], and made "Sound" the name of my Lvar:[Config]Lvar=Sound[sounds]Sound00=./Aircraft/my_aircraft/Sound/Panel/altitude.wavSound01=./Aircraft/my_aircraft/Sound/Panel/APU_fire.wavSound02=./Aircraft/my_aircraft/Sound/Panel/bingo.wavCalling gauge:-------------Some Condition... 1 (>L:Sound, number)Nothing happens. I tried various configurations including the default locations and names, but it just doesn't work. Reading (L:Sound, number) always shows 0 where (I assume) it should show the "resting" value of 260 when not playing.Thanks,--Jon

Share this post


Link to post
Share on other sites

Jon,Try changing this:Panel.cfg entry:------------------gauge16=my_aircraft!sound, 2,2,5,5,./Aircraft/my_aircraft/Sound/Panel/Panel_Sound.cfgto thisgauge16=my_aircraftsound!dsd_xml_sound2, 2,2,5,5,./Aircraft/my_aircraft/Sound/Panel/Panel_Sound.cfgYou are welcome to rename the gauge, but the internal name will still be dsd_xml_sound2.Doug

Share this post


Link to post
Share on other sites

Jon,Glad it was that easy to fix!Don't worry about payment - if I had charged for this thing, I would have about 600 warranty claims about now...It will remain free to all freeware users.Cheers,Doug

Share this post


Link to post
Share on other sites
Guest pauld2004

Thanks Doug,I'll give it a try and will let you know.Paul

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...