Matthew Twomey Posted November 9, 2020 Report Share Posted November 9, 2020 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: (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 More sharing options...
Pete Dowson Posted November 10, 2020 Report Share Posted November 10, 2020 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 More sharing options...
Matthew Twomey Posted November 10, 2020 Author Report Share Posted November 10, 2020 1. [[STRING]] is quoted literal format for Lua. It works fine and avoids the need to escape anything, you can read more about it on lua.org. None the less, I've tried it several ways including a regular escaped string. 2. What is the best way to check this? -Matt Link to comment Share on other sites More sharing options...
Matthew Twomey Posted November 10, 2020 Author Report Share Posted November 10, 2020 For #2, if it's a valid test - I can confirm that I can certainly play sounds from other Windows applications while MSFS is running and producing sound. For example I can watch Youtube videos with audio, use the media player, ...etc. I Can also play the wav file(s) in question. Link to comment Share on other sites More sharing options...
John Dowson Posted November 10, 2020 Report Share Posted November 10, 2020 Just checked this - it works in FSUIPC6 but not in FSUIPC7. I'll investigate and get back to you. John Link to comment Share on other sites More sharing options...
Matthew Twomey Posted November 10, 2020 Author Report Share Posted November 10, 2020 12 minutes ago, John Dowson said: Just checked this - it works in FSUIPC6 but not in FSUIPC7. I'll investigate and get back to you. Ok - thank you sir! Link to comment Share on other sites More sharing options...
John Dowson Posted November 10, 2020 Report Share Posted November 10, 2020 @Matthew Twomey Please try the following: FSUIPC7.exe Link to comment Share on other sites More sharing options...
Matthew Twomey Posted November 10, 2020 Author Report Share Posted November 10, 2020 3 hours ago, John Dowson said: @Matthew Twomey Please try the following: FSUIPC7.exe 588.5 kB · 1 download @John Dowson - yep, works. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now