Jump to content
The simFlight Network Forums

esound again


Recommended Posts

Hi Pete, you were right, I must of had a corrupt sound wav. All is ok again.

Please help with this. I am applying sounds to the light switches.

If I use the code

9=VW0D0C=1,6,0

the sound no 6 plays when any light is switched on.

In your FSUIPC SDK you list,

0D0C 2 Lights (FS2k/CFS2), a switch for each one (bits from lo to hi):

0 Navigation

1 Beacon

2 Landing

3 Taxi

4 Strobes

5 Instruments

6 Recognition

7 Wing

8 Logo

9 Cabin

How do I apply the code to switch each of these lights individually to code

9=VW0D0C=1,6,0

Many thanks for your help.

Nick.

Link to comment
Share on other sites

How do I apply the code to switch each of these lights individually

Since the word at 0D0C contains one bit for each light switch you need to apply a mask. For instance, for the Strobes (as an example), which are switched by bit 4, you'd need

9=VW0D0C.0010=X0010,6,0

Bit 4 is the 4th bit up counting from 0: in binary 1 0 0 0 0, in hex 10. This is 16 in decimal (2^4 = 16). So, the mask of 0010 is applied, so that only that one bit is selected, then you compare the result with 0010, which is what you'll get if the switch is on.

Et cetera.

Regards,

Pete

Link to comment
Share on other sites

Many thanks for the reply.

I am now having some success. However,

9=VW0D0C.0010=X0010,6,0 crashes FS2004 when using an FS2004 sound (not one of mine). I hear the sound though, so things are moving forward. I have also managed to get the other switches to work, but again, crash after the sound is played (same sound).

Nick.

Link to comment
Share on other sites

9=VW0D0C.0010=X0010,6,0 crashes FS2004 when using an FS2004 sound (not one of mine). I hear the sound though, so things are moving forward. I have also managed to get the other switches to work, but again, crash after the sound is played (same sound).

If the sound is played then it isn't likely to be Esound which is crashing -- it has long since finished its part in this and relinquished control. I really cannot spend any more time on this. I think you really do need to investigate the sound files you are using.

Regards,

Pete

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.