Sign in to follow this  
Rocky

Programmatically determine if sound is on or off

Recommended Posts

Do you know a way to determine in a gauge if the sound of FS is currently on or off?As I play gauge sounds in my code, I wouldn't like these sounds to play if the FS sound is off...Eric

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Eric,I don't think there is a way.The simplest way is to force the FS sound On when the gauge loads, and then maintain the current FS sound status locally by monitoring the sound events.Doug Dawson applied this "trick" in his latest XMLsound gauge.Cheers, RobPS: How is your A321 panel progressing ?? I'm still interrested :-)

Share this post


Link to post
Share on other sites

It's not very reliable but:Test the Q key in a hook or intercept the sound off message (never tried htis last approach)Jos

Share this post


Link to post
Share on other sites

Hi Jose,That's what I suggested as well :-)The only problem is that if FS starts up with SoundDisabled, you'll never get the SOundOff event ..Cheers, Rob

Share this post


Link to post
Share on other sites

For a C gauge:Took me about 30 seconds of playing with a memory search program to find that Global.dll + 0x3B20 (Linkage + 0x0B20) is just what you're looking for. You can even write that value to turn sound on/off. ;-)

Share this post


Link to post
Share on other sites

Matt-you sure you didn't cheat by looking into Pete Dowson's "FSUIPC for Programmers.doc" file which has most "old" global.dll pointer values ready for you? :-)(just teasing...)Best,

Share this post


Link to post
Share on other sites

No cheating from me, but I did use the answer sheet to check my answer. :D

Share this post


Link to post
Share on other sites

Thanks for the info, but I'd rather NOT use this method because it is not very "standard", and not documented. It will probably not work in FS2006.Nevertheless, it works fine in FS2004 :-)Thanks.Eric

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