Jump to content
Sign in to follow this  
Guest Albatross7107

Silencing dsd_sound outside the cockpit

Recommended Posts

Guest Albatross7107

I put this in the gauge... (A:COM TRANSMIT:1,bool) 1 == if{ 1 (>L:c1on,number) 0 (>L:c2on,number) } (A:COM TRANSMIT:2,bool) 1 == if{ 0 (>L:c1on,number) 1 (>L:c2on,number) } (P:ACTIVE VIEW MODE,enum) 3 >= if{ 1 (>L:dsd_xml_sound_volume,number) } els{ 95 (>L:dsd_xml_sound_volume,number) } My only question is this - is it a bad idea to keep telling dsd_sound a volume setting with every refresh? I don't notice any sort of performance hit at all, I was just wondering.

Share this post


Link to post
Share on other sites

All you're doing here is assigning a value to an L:Var. That's pretty cheap as far as CPU cost goes. Do keep in mind though, nothing will happen unless you are also setting the sound's control variable somewhere.The other thing to keep in mind, if you are looking to be efficient with processing power, is that playing a sound has the same CPU cost, regardless of volume level. If you really want to save CPU cycles, refine your logic to actually shut the sounds off when the user is in an external view.Doug

Share this post


Link to post
Share on other sites
Guest Albatross7107

Actually, I decided that I didn't like NO sound, so I set it to be very faint instead.At any rate, I just wanted to be sure I wasn't doing something that was going to create a situation where resources were being consumed and would build up into a problem - like an endless loop of sorts...Again, thanks for this great "Gauge" to bridge the gap between XML gauges and sound! :-yellow1 :7

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...