Jump to content

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

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...