DaveSCUSA Posted September 25 Report Posted September 25 Hello John, I have attached several items: 1. Windows Sound - the sound bar from Windows 11, 2. Sound.ini - the sound entries in FSUIPC7.ini, 3. MSFS Sound Assignment - from MSFS settings, 4. MSFS Sound Volume - the volume settings in MSFS, 5. Landing.log - the log, 6. Landing.lua - the Lua file, 7. 2000.wav - a sample wave file in C:\FSUIPC7\Callouts. No matter what I do, I can't hear the altitude callouts. I use a headset to listen to my MSFS on Windows 11. I can hear every other sound - engines, gear, ATC voices, etc. but no callouts. Can you help trying to find why no sound. There is even a 500 ft callout from the aircraft's panel.exe file that I can hear. 2000.wav Sound.ini Landing.log Landing.lua
John Dowson Posted September 25 Report Posted September 25 sound.adjust takes a reference (returned from sound.play or playloop), not a device number. If its just a sound issue, create a simple lua to test the sound, i.e sound.path("C:\FSUIPC7\Callouts") ipc.log("Playing sounds on device 4: " .. sound.device(4)) ref=sound.play("2000",4) sound.adjust(ref, 100) ref=sound.play("1000",4) sound.adjust(ref, 100) ref=sound.play("500",4) sound.adjust(ref, 100) ref=sound.play("400",4) sound.adjust(ref, 100) ref=sound.play("300",4) sound.adjust(ref, 100) ref=sound.play("200",4) sound.adjust(ref, 100) ref=sound.play("100",4) sound.adjust(ref, 100) ref=sound.play("50",4) sound.adjust(ref, 100) ref=sound.play("40",4) sound.adjust(ref, 100) ref=sound.play("30",4) sound.adjust(ref, 100) ref=sound.play("20",4) sound.adjust(ref, 100) ref=sound.play("10",4) Then assign that to a button. Also test on other sound devices (you could make the device number a parameter, or wrap it in a loop to iterate over devices 0-6. Do you hear anything on any device? Also try setting a Log->Custom value of x20. This should add additional logging on sounds.
DaveSCUSA Posted Friday at 07:04 PM Author Report Posted Friday at 07:04 PM Sorry John - can't seem to get the sound library to work. As you can see from the Lua file, I used your above suggestion (in part) to test each sound device. Didn't hear any sound from this module. Please help! FSUIPC7.ini Sound2.log Sound2.lua
DaveSCUSA Posted Friday at 09:44 PM Author Report Posted Friday at 09:44 PM On 9/25/2025 at 2:41 PM, John Dowson said: Also try setting a Log->Custom value of x20. This should add additional logging on sounds. Not sure what this means. Can you be more specific?
John Dowson Posted Saturday at 08:54 AM Report Posted Saturday at 08:54 AM 11 hours ago, DaveSCUSA said: Not sure what this means. Can you be more specific? Select the Custom entry under the Log menu, and enter x20...
John Dowson Posted Saturday at 09:25 AM Report Posted Saturday at 09:25 AM Tested on my machine and I only get sound out of one of my 7 devices. Not sure why, but I don't have time to look into this at the moment. I will make a note and look into it when time permits, but this won't be for quite a while.
John Dowson Posted Saturday at 11:50 AM Report Posted Saturday at 11:50 AM 2 hours ago, John Dowson said: Tested on my machine and I only get sound out of one of my 7 devices. Not sure why, I added the sound.adjust and now I get sound out of all of my sound devices, so not sure why its not working for you. Add that custom logging and see what it logs - this is my log: Quote 78946563 LUA.18: beginning "D:\FSUIPC7\Lua\soundTest.lua" 78946563 LUA.18: Playing gear_down from local folder 78946563 Sound: Id 33, PlayNow("gear_down") 78946563 Sound: Id 33, PlayTheSound("gear_down.wav") 78950594 LUA.18: Playing gear_down from local folder on device 4: Primary Sound Driver 78950594 Sound: Id 34, PlayNow("gear_down") 78950594 Sound: Id 34, PlayTheSound("gear_down.wav") 78951188 Sound: Id 33 DeActivate: sound not playing now ... 78951188 Sound: Id 33 EndPlay: releasing buffer 78951203 Sound: Id 0 EndPlay: all done! 78952610 LUA.18: Playing invalid wav file ... 78952610 Sound: Id 35, PlayNow("noSuchWav") 78952610 Sound: Id 35, PlayTheSound("noSuchWav.wav") 78952610 *** mmioOpen Failed, Error 0 78952610 LUA.18: Playing invalid wav file: ref = 35 78954641 LUA.18: Playing canopy closing from sound 78954641 Sound: Id 35, PlayNow("sound\canopy_closing") 78954641 Sound: Id 35, PlayTheSound("sound\canopy_closing.wav") 78955188 Sound: Id 34 DeActivate: sound not playing now ... 78955188 Sound: Id 34 EndPlay: releasing buffer 78955188 Sound: Id 0 EndPlay: all done! 78955813 Sound: Id 35 DeActivate: sound not playing now ... 78955813 Sound: Id 35 EndPlay: releasing buffer 78955813 Sound: Id 0 EndPlay: all done! 78958656 LUA.18: Changing Sound path to 'F:\Sounds' 78958656 LUA.18: Playing bong on device 0: Primary Sound Driver 78958672 Sound: Id 35, PlayNow("F:\Sounds\bong") 78958672 Sound: Id 35, PlayTheSound("F:\Sounds\bong.wav") 78962188 Sound: Id 35 DeActivate: sound not playing now ... 78962188 Sound: Id 35 EndPlay: releasing buffer 78962188 Sound: Id 0 EndPlay: all done! 78962703 LUA.18: Playing bong on device 1: Primary Sound Driver 78962703 Sound: Id 35, PlayNow("F:\Sounds\bong") 78962719 Sound: Id 35, PlayTheSound("F:\Sounds\bong.wav") 78966250 Sound: Id 35 DeActivate: sound not playing now ... 78966250 Sound: Id 35 EndPlay: releasing buffer 78966250 Sound: Id 0 EndPlay: all done! 78966735 LUA.18: Playing bong on device 2: Speakers (3- Razer Nommo Pro) 78966735 Sound: Id 35, PlayNow("F:\Sounds\bong") 78966735 Sound: Id 35, PlayTheSound("F:\Sounds\bong.wav") 78970266 Sound: Id 35 DeActivate: sound not playing now ... 78970266 Sound: Id 35 EndPlay: releasing buffer 78970266 Sound: Id 0 EndPlay: all done! 78970750 LUA.18: Playing bong on device 3: Speakers (Dell USB Audio) 78970750 Sound: Id 35, PlayNow("F:\Sounds\bong") 78970750 Sound: Id 35, PlayTheSound("F:\Sounds\bong.wav") 78974266 Sound: Id 35 DeActivate: sound not playing now ... 78974266 Sound: Id 35 EndPlay: releasing buffer 78974266 Sound: Id 0 EndPlay: all done! 78974781 LUA.18: Playing bong on device 4: Speakers (XMOS USB Audio 2.0) 78974781 Sound: Id 35, PlayNow("F:\Sounds\bong") 78974781 Sound: Id 35, PlayTheSound("F:\Sounds\bong.wav") 78978344 Sound: Id 35 DeActivate: sound not playing now ... 78978344 Sound: Id 35 EndPlay: releasing buffer 78978344 Sound: Id 0 EndPlay: all done! 78978797 LUA.18: Playing bong on device 5: DigitalOutput (NVIDIA High Definition Audio) 78978797 Sound: Id 35, PlayNow("F:\Sounds\bong") 78978797 Sound: Id 35, PlayTheSound("F:\Sounds\bong.wav") 78982344 Sound: Id 35 DeActivate: sound not playing now ... 78982344 Sound: Id 35 EndPlay: releasing buffer 78982344 Sound: Id 0 EndPlay: all done! 78982828 LUA.18: Playing bong on device 6: Speakers (Realtek(R) Audio) 78982828 Sound: Id 35, PlayNow("F:\Sounds\bong") 78982828 Sound: Id 35, PlayTheSound("F:\Sounds\bong.wav") 78982828 LUA.18: Finished SoundTest 78986344 Sound: Id 35 DeActivate: sound not playing now ... 78986344 Sound: Id 35 EndPlay: releasing buffer 78986344 Sound: Id 0 EndPlay: all done! John
John Dowson Posted Saturday at 12:08 PM Report Posted Saturday at 12:08 PM It could be the wav files you are using - see It may have a bit_sample_rate value that prevents it from being played (if so, it can be converted). Can you attach one of the wav files here and I will check them, and also maybe try with a different wav file (e.g. the one attached). That custom logging of x20 should also help....show me your FSUIPC7.log file with that added, and remove logging for Lua Plugins and Log Lua Separately (I like to see everything in the same log file) - the ipc.log statements should be enough.. bong.wav
DaveSCUSA Posted Saturday at 04:32 PM Author Report Posted Saturday at 04:32 PM 4 hours ago, John Dowson said: It could be the wav files you are using - see It may have a bit_sample_rate value that prevents it from being played (if so, it can be converted). Can you attach one of the wav files here and I will check them, and also maybe try with a different wav file (e.g. the one attached). That custom logging of x20 should also help....show me your FSUIPC7.log file with that added, and remove logging for Lua Plugins and Log Lua Separately (I like to see everything in the same log file) - the ipc.log statements should be enough.. bong.wav 985.5 kB · 14 downloads Thanks
DaveSCUSA Posted Saturday at 08:35 PM Author Report Posted Saturday at 08:35 PM Help with "sound.play( )" in MSFS June 3, 2023 I read the above post and converted file to 16 bits with no fade using the converter. I am still receiving the same error, mmioOpen Failed, Error 0. I also changed the logs. Altitude.wav Flapsup.wav FSUIPC7.log Sound2.lua
DaveSCUSA Posted Saturday at 09:34 PM Author Report Posted Saturday at 09:34 PM I noticed PlayTheSound("C:FSUIPC7\Altitude.wav") has a slash missing after the C:. Could that be the real problem?
DaveSCUSA Posted Sunday at 02:38 AM Author Report Posted Sunday at 02:38 AM I changed sound.path("C:\FSUIPC7") to sound.path("C:\\FSUIPC7") and it worked (heard the sound on the 1st 4). Should not a single \ not be removed?
ark1320 Posted Sunday at 06:44 PM Report Posted Sunday at 06:44 PM 16 hours ago, DaveSCUSA said: I changed sound.path("C:\FSUIPC7") to sound.path("C:\\FSUIPC7") and it worked (heard the sound on the 1st 4). Should not a single \ not be removed? The sound path in Lua requires the use of double slashes (\\), e.g., sound.path("C:\\Flight Simulation\\AddOns\\FSUIPC7_MSFS2024\\ApproachCallouts"). A single slash in a Lua path indicates what follows is a special character of some kind. I looked through the sound library documentation, and also the FSUIPC7 user guides, and could not find where this was clearly spelled out. Unless I just missed it, I think it would be useful to document this in the sound library. Al
DaveSCUSA Posted Monday at 02:41 PM Author Report Posted Monday at 02:41 PM Thank you and interesting. There are other instances where a file path is required, e.g. Lua Path or Profile Path. Perhaps the sound path should be handled in the same way. Does ipc.shell or ipc.run require a double \? At least update the documentation.
John Dowson Posted Monday at 03:19 PM Report Posted Monday at 03:19 PM 21 minutes ago, DaveSCUSA said: Does ipc.shell or ipc.run require a double \? Probably. '\' is the lua escape character, so any lua strings that want to use this character as it is must use '\\' (or '\b'). So all lua functions that take a string argument that contains a path will need this escaped. There are many such functions. 25 minutes ago, DaveSCUSA said: At least update the documentation. What documentation? I am not going to state this in every lua function that accepts a file path. Consult the lua documentation or google for details on lua, e.g. https://how.dev/answers/what-are-escape-characters-in-lua John
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