Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello,
I've been using FSX + FSUIPC 4.853 + WideFS7( Key provided) + Linda Lua 2.9.6.550  in my homecockpit for a long time - FSX main computer + 4 clients without problems.
Now, for example,  I wanted to play a suitable Airbus Wav file for the Master Caution Light on the FSX PC.
I call the sound.play function via event.offset of the M / C offset.
The following appears about the sound in the FSUIPC log file (Debug=Please and LogExtras=x20 activated):
...
   431686 Sound: Id 1, PlayNow("D:\Airbus_FWC\airbus_warning")
   431686 Sound: Id 1, PlayTheSound("D:\Airbus_FWC\airbus_warning.wav")
...
   67158 Sound: EnumDevice=Primärer Soundtreiber
   
I tested different wav file paths and different wav files, as well as different sound devices from the FSUIPC.ini file.
nothing arrives in Windows 7!
All other audios and sounds in FSX as well as from any other program work perfectly. 
A similar post here had the same problem a few years ago - it said, probably a windows problem (driver or something similar).
Are there any more recent findings? 


Best Regards
 

Posted
15 hours ago, yak54 said:

Are there any more recent findings? 

Not that I know of.

You ought to show us the Lua file itself, please.

Is the WAV file is a format recognised by Windows?

Pete

 

Posted

Hello Pete,

I have attached the Lua file.

Lines that have been commented out come from some tests.

I can easily play the wav file on this PC with Windows media player or VLC.

Best regards

actions.lua

Posted
1 hour ago, yak54 said:

I have attached the Lua file.

Phew! I was expecting a tiny program which just played the sound on a change in an offset. I could then have tested it here.

I'll just make something simple like your

   function Sound_Warning ()
          sound.path("D:\\Airbus_FWC\\")
          sound.play("airbus_warning")
    end

  event.offset(0x73AE, "UB", "Sound_Warning")

But with a different path and wave file (as I don't have yours. I'll also need to change the offset via FSInterrogate as I don't have anything using that one.

Pete

 

Posted

Tested and all working. I just noticed your FSUIPC4 version is well out of date and is not supported. You need to download the current one, 4.976.

My results were good, tested with this Lua plug-in:

function Sound_Warning ()
     ipc.log("Sound Warning called")
     sound.path("C:\\Steam\\steamapps\\common\\FSX\\sound\\")
     sound.play("xeng_fire_2")
end

event.offset(0x73AE, "UB", "Sound_Warning")

With the logging enabled I get this in the log:

    78078 LUA.0: Sound Warning called
    78125 Sound: Id 1, PlayNow("C:\Steam\steamapps\common\FSX\sound\xeng_fire_2")
    78125 Sound: Id 1, PlayTheSound("C:\Steam\steamapps\common\FSX\sound\xeng_fire_2.wav")
    83812 Sound: Id 1 DeActivate: sound not playing now ...
    83812 Sound: Id 1 EndPlay: releasing buffer
    83812 Sound: Id 0 EndPlay: all done!


This of course is using the default sound device, since I gave no device number in the sound.play function.

I suggest that, after you update your FSUIPC4 installation, you test with something simpler and using one o the sounds installed with FSX.  You could also try selection the sound device explicitly. The numbers to use are listed in the [Sounds] section of the FSUIPC4.INI file.

Note that, unless you are changing the sound folder for different sounds, there's no point in having the sound.path in your function, being set every time. Just set it the once, at the start of the Lua code.

Pete

 

Posted

Hello Pete,

thank you for your tests.

I'll see that I update my FSUIPC4 version (and WideFS 7 too?)

Will my registration for FSUIPC + WideFS remain valid?

Best regards

Posted
13 hours ago, yak54 said:

Will my registration for FSUIPC + WideFS remain valid?

Yes, your registration details for FSUIPC4 will be valid for all versions of FSUIPC4, and the same for WideFS7. The latest version of WideFS7 is 7.156.

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.