Jump to content
The simFlight Network Forums

[Lua] Sound not working in FSUIPC7


Matthew Twomey

Recommended Posts

I can't seem to get the sound working in FSUIPC7. Here's what I'm doing:

ipc.log(sound.device(0));
sound.path([[C:\]]);
s = sound.play("click2");
if (sound.query(s)) then
    ipc.log("Sound played.");
else
    ipc.log("Sound not played.");
end

Here's the result I'm getting:

1475122689_ScreenShot2020-11-09at5_29_47PM.png.cfaa1b26ab680d87810f212cf1771bf0.png

(and obviously no sound is playing)

I have a 1 minute long wav file (named 'click2.wav') right in C:\ (just to make sure there were no path spaces issues). Windows can play the file fine, but I've also tried several different files.

Link to comment
Share on other sites

Two questions:

1.  What syntax is this?  "sound.path([[C:\]]);".
Surely that should be sound.path("C:\\")

2.  Have you checked to make sure MSFS doesn't have exclusive access to your sound driver? With FSUIPC7 being a separate process, unlike in previous incarnations, that's a factor.

BTW you don't need ; at the end of each statement in Lua. I know it's a habit from C/C++ and so on. It does no harm, just not needed.

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.