Sign in to follow this  
Guest Albatross7107

Silencing dsd_sound outside the cockpit

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

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

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