XRSound Open-Source Development

Xyon

Puts the Fun in Dysfunctional
Administrator
Moderator
Addon Developer
Webmaster
GFX Staff
Donator
Beta Tester
Joined
Aug 9, 2009
Messages
6,870
Reaction score
668
Points
203
Location
10.0.0.1
Website
www.orbiter-radio.co.uk
Preferred Pronouns
she/her
Could you do both? You'd have your release packages along the way to provide users with the latest stable version, but you would also have the "current" package for developers, built from the latest master commit. Maybe they could even set up their own repositories to look for changes in that package, automatically fetch it and compile their own addon coded against it, to get instant warning of impending trouble.
Absolutely you can have both, you can do whatever you like with it! I would suggest having the "developer" builds have a marker in their versioning somehow, to make it obvious to consumers they're effectively prerelease or snapshot builds. But I love the idea of a community of open source addons consuming the latest Orbiter changes automatically and rebuilding against the latest code to check they remain compatible!

I like the beep change, for sure! The others are a bit subjective (e.g., the new scrams sound harsh to me), lol. In any case, I love the idea of having multiple sound packs users could choose from and use -- we could even bundle them all into the main XRSound zip.
Thanks for making this open source! Crazy week it has been for orbiter fans. I would love to contribute with this if you guys are interested. I'm not as smart as most of you so I won't be of any help programming and such but I do love sound design so I could do an overhaul of the sound to make it even more immersive. Not that the sounds are bad or anything right now but they can sound a bit flat at times. I made you guys a few a/b examples.

https://soundcloud.com/sea-of-separation%2Fsets%2Forbiter%2Fs-MFRa60NYChH

Let me know if this would be of any interest. I love doing these things and I love Orbiter.

I like the changed beep, and the APU - the scram is indeed quite a harsh re-imagining, but I really like the idea of these being selectable options, that the user can choose from.
 
Last edited:

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
More news here! After an invitation from Martin, XRSound is now a direct part of the Orbiter repository here: https://github.com/orbitersim/orbiter/tree/main/Sound/XRSound. The eventual plan from a short chat with Martin is that the Orbiter core will define a sound API for features common to Orbiter sound add-ons, which will give add-on developers a sound-plugin-independent way to play custom sounds. In addition, since the Orbiter sound module(s) will be built as part of the normal Orbiter build process, users will get sound out-of-the-box with no additional configuration required. ?

All of the existing XRSound files have been migrated to orbiter\Sound\XRSound, including the VS 2019 solution and .vcxproj files, so you can still easily build XRSound on its own if you prefer.

I have archived my original XRSound repository and marked it private to prevent confusion. I have updated the first post in this thread as well.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,407
Reaction score
341
Points
83
Website
orbit.medphys.ucl.ac.uk
Very exciting to have the XRSound project inside Orbiter!

I was playing around with integrating the sound build into the overall Orbiter build, with mixed success. (you can check it out on the trigger_sound_build branch). I am invoking the XRsound build as an external non-cmake project, so I didn't have to touch Doug's XRsound folder. Essentially, I am directly calling msbuild XRSound/XRSound.sln. This mostly works - it builds the XRSound.dll and deploys it in Modules\Plugin, but then the build fails. I suspect that calling msbuild directly bypasses some VS environment settings (at some point the build fails to find the powershell executable pwsh.exe). Still, first steps.

The non-cmake setup is a bit clunky. If you don't mind Doug, I would like to try building it with CMake to see if that works smoother. This would however mean that I would have to put a CMakeLists.txt file into your XRSound folder.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
The non-cmake setup is a bit clunky. If you don't mind Doug, I would like to try building it with CMake to see if that works smoother. This would however mean that I would have to put a CMakeLists.txt file into your XRSound folder.

Sure, I'm fine with that. And thanks for tackling the build integration, I wasn't looking forward to that since I'm not familiar with CMake. :)
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
What is this going to do to addons that use OrbiterSound? Will users still be able to install OrbiterSound if they want?

Absolutely! All they will do is uncheck the XRSound module and then check the OrbiterSound module in the Launchpad. They can also manually install a SoundBridge if they want, although I'm still hopeful that we can add Face's SoundBridge to the Orbiter repository as well so that users will have custom sounds for OrbiterSound-only vessels out-of-the-box. (y)

I'm also still hopeful that we can get OrbiterSound added to the Orbiter repository as well so that users will have a choice at install time of which one to activate. But that depends on how Dan wants to handle it (i.e., whether to switch it to open source and add x64 support).
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,407
Reaction score
341
Points
83
Website
orbit.medphys.ucl.ac.uk
Sound progress! I now have a branch (trigger_sound_build_cmake) which builds XRSound for both 32 and 64 bit targets.
The location of the irrKlang installation has to be provided in the "IRRKLANG_DIR" cmake parameter. Make sure you pick the correct architecture for 32 and 64 bit builds.
I tested the 64-bit version without graphics, because I haven't yet got round to compile x64-D3D9Client (my next task), but sound is coming through nicely even without graphics.

Doug, please give it a try and see if builds ok for you. I had to add a few more than just one CMakeLists.txt, but it should be reasonably clean and obvious.
One question: the DLL import library (XRSoundDLL.lib) is not deployed, right? Just making sure I didn't miss anything.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
Doug, please give it a try and see if builds ok for you. I had to add a few more than just one CMakeLists.txt, but it should be reasonably clean and obvious.

Thanks for your work on this! Here's what I did:
  1. Cloned the branch "trigger_sound_build_cmake" into a clean folder.
  2. Opened the folder in VS 2019.
  3. Clicked Project | Configure Orbiter.
  4. Set the IRRKLANG_DIR property to D:\irrKlang_x64.
  5. Clicked Project | Configure Orbiter again.
  6. Click Build | Rebuild All.
The build got the second XRSound CMake copy files step (step 70 below), but failed with a generic error message:

Code:
should not include d3dtypes.h when compiling for DX8 or newer interfaces
  [69/467] cmd.exe /C "cd /D D:\GitHub\orbiter\out\build\x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/BinAssets/ D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Scenarios/ D:/GitHub/orbiter/out/build/x64-Debug/Scenarios && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Textures/ D:/GitHub/orbiter/out/build/x64-Debug/Textures && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Meshes/ D:/GitHub/orbiter/out/build/x64-Debug/Meshes && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Script/ D:/GitHub/orbiter/out/build/x64-Debug/Script && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Config/ D:/GitHub/orbiter/out/build/x64-Debug/Config && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Flights/ D:/GitHub/orbiter/out/build/x64-Debug/Flights && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Orbitersdk/include/ D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/include && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/lib/Lua && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Extern/Lua/Lua-5.1-x64/dll/lua5.1.lib D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/lib/Lua/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Extern/Lua/Lua-5.1-x64/dll/lua5.1.dll D:/GitHub/orbiter/out/build/x64-Debug"
  [70/467] cmd.exe /C "cd /D D:\GitHub\orbiter\out\build\x64-Debug\Sound\XRSound && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory D:/GitHub/orbiter/out/build/x64-Debug/XRSound && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-Atlantis.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-DG-S.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-DeltaGlider.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-ShuttleA.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound.cfg D:/GitHub/orbiter/out/build/x64-Debug/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/ReadMe.txt D:/GitHub/orbiter/out/build/x64-Debug/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy "D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/Doc/XRSound User Manual.pdf" D:/GitHub/orbiter/out/build/x64-Debug/Doc/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Sound/XRSound/XRSound/src/XRSoundLib/XRSound.h D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/irrKlang_x64/bin/Winx64-visualStudio/ikpMP3.dll D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/irrKlang_x64/bin/Winx64-visualStudio/ikpFlac.dll D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/irrKlang_x64/bin/Winx64-visualStudio/irrKlang.dll D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/Default D:/GitHub/orbiter/out/build/x64-Debug/XRSound/Default"
  ninja: build stopped: subcommand failed.

What's so odd is, if I copy the exact same command in step 70 and paste it into a Command Prompt, it succeeds:

D:\>cmd.exe /C "cd /D D:\GitHub\orbiter\out\build\x64-Debug\Sound\XRSound && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory D:/GitHub/orbiter/out/build/x64-Debug/XRSound && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-Atlantis.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-DG-S.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-DeltaGlider.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound-ShuttleA.cfg D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/XRSound.cfg D:/GitHub/orbiter/out/build/x64-Debug/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/ReadMe.txt D:/GitHub/orbiter/out/build/x64-Debug/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy "D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/Doc/XRSound User Manual.pdf" D:/GitHub/orbiter/out/build/x64-Debug/Doc/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Sound/XRSound/XRSound/src/XRSoundLib/XRSound.h D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/irrKlang_x64/bin/Winx64-visualStudio/ikpMP3.dll D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/irrKlang_x64/bin/Winx64-visualStudio/ikpFlac.dll D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/irrKlang_x64/bin/Winx64-visualStudio/irrKlang.dll D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Sound/XRSound/XRSound/assets/XRSound/Default D:/GitHub/orbiter/out/build/x64-Debug/XRSound/Default"

D:\>echo %ERRORLEVEL%
0

So far, I can't figure out why that CMake step is failing in VS 2019, but succeeds when I run the same command from a Command Prompt.

EDIT:
An interesting update here: I get the same error on the first CMake copy command even if I run in the 'main' branch (no XRSound build integration yet):

Code:
  [54/452] cmd.exe /C "cd /D D:\GitHub\orbiter\out\build\x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/BinAssets/ D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Scenarios/ D:/GitHub/orbiter/out/build/x64-Debug/Scenarios && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Textures/ D:/GitHub/orbiter/out/build/x64-Debug/Textures && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Meshes/ D:/GitHub/orbiter/out/build/x64-Debug/Meshes && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Script/ D:/GitHub/orbiter/out/build/x64-Debug/Script && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Config/ D:/GitHub/orbiter/out/build/x64-Debug/Config && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Flights/ D:/GitHub/orbiter/out/build/x64-Debug/Flights && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Orbitersdk/include/ D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/include && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/lib/Lua && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Extern/Lua/Lua-5.1-x64/dll/lua5.1.lib D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/lib/Lua/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Extern/Lua/Lua-5.1-x64/dll/lua5.1.dll D:/GitHub/orbiter/out/build/x64-Debug"
  ninja: build stopped: subcommand failed.

...and like with other branch, the exact same command works fine when I paste and run it from a Command Prompt:

D:\>cmd.exe /C "cd /D D:\GitHub\orbiter\out\build\x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/BinAssets/ D:/GitHub/orbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Scenarios/ D:/GitHub/orbiter/out/build/x64-Debug/Scenarios && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Textures/ D:/GitHub/orbiter/out/build/x64-Debug/Textures && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Meshes/ D:/GitHub/orbiter/out/build/x64-Debug/Meshes && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Script/ D:/GitHub/orbiter/out/build/x64-Debug/Script && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Config/ D:/GitHub/orbiter/out/build/x64-Debug/Config && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Flights/ D:/GitHub/orbiter/out/build/x64-Debug/Flights && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory D:/GitHub/orbiter/Orbitersdk/include/ D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/include && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/lib/Lua && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Extern/Lua/Lua-5.1-x64/dll/lua5.1.lib D:/GitHub/orbiter/out/build/x64-Debug/Orbitersdk/lib/Lua/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy D:/GitHub/orbiter/Extern/Lua/Lua-5.1-x64/dll/lua5.1.dll D:/GitHub/orbiter/out/build/x64-Debug"

D:\>echo %ERRORLEVEL%
0

One question: the DLL import library (XRSoundDLL.lib) is not deployed, right? Just making sure I didn't miss anything.

That's correct; XRSoundDLL.lib is not deployed. (y)
 
Last edited:

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,407
Reaction score
341
Points
83
Website
orbit.medphys.ucl.ac.uk
Could you check if "ORBITER_MAKE_DOC" is ticked (it is by default) and if so, untick it and try again? It looks like this can cause problems if not all executables required for compiling the documentation are present, and sometimes even then.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
Unchecking "ORBITER_MAKE_DOC" fixed the build failing, thanks!! However, although I still have "ORBITER_BUILD_XRSOUND" checked, when I do a "Rebuild All" now, it's not building XRSound at all from what I can tell, and no XRSound.dll, XRSound.lib, or XRSoundD.lib are copied to their install locations under out\build\x64-Debug. Build log is attached, in case it helps.

On a side note, what about removing the "Disable font smoothing while Orbiter is running" setting? By default, every time Orbiter crashes, ClearType is disabled, lol. (And with D3D9, the performance hit should be less of an issue, right?)
 

Attachments

  • build_all_log.txt
    54.7 KB · Views: 2

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,407
Reaction score
341
Points
83
Website
orbit.medphys.ucl.ac.uk
Unchecking "ORBITER_MAKE_DOC" fixed the build failing, thanks!! However, although I still have "ORBITER_BUILD_XRSOUND" checked, when I do a "Rebuild All" now, it's not building XRSound at all from what I can tell, and no XRSound.dll, XRSound.lib, or XRSoundD.lib are copied to their install locations under out\build\x64-Debug. Build log is attached, in case it helps.
Ok, one step further. I'll compare the log with mine when I get home to check if I can spot the difference, but in the meantime, could you check <build-dir>/CMakeCache.txt for the ORBITER_BUILD_XRSOUND entry. Just to make perfectly clear that CMake really knows it's supposed to build the sound module? I noticed that the CMakePresets.json viewer inside VS is sometimes a bit flaky and doesn't copy the settings correctly, at least for me. Quite annoying really.
On a side note, what about removing the "Disable font smoothing while Orbiter is running" setting? By default, every time Orbiter crashes, ClearType is disabled, lol. (And with D3D9, the performance hit should be less of an issue, right?)
Ah yes, good point. At least I'll change the default for now. I still got a performance difference with the D3D7client on my machine (which is quite old now by any standards), but these days the inconvenience probably outweighs any benefits.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
Just to make perfectly clear that CMake really knows it's supposed to build the sound module? I noticed that the CMakePresets.json viewer inside VS is sometimes a bit flaky and doesn't copy the settings correctly, at least for me. Quite annoying really.

Sure, I've attached the contents of my out\build\x64-Debug\CMakeCache.txt file here.
 

Attachments

  • CMakeCache.txt
    20.5 KB · Views: 2

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,407
Reaction score
341
Points
83
Website
orbit.medphys.ucl.ac.uk
Ok, so it wasn't that - pity, that would have been an easy fix. The funny thing is, when it crashed before you turned off the doc build, cmake definitely got into the XRSound build files, but the latest build log doesn't seem to have any mention of XRSound anymore.
Debugging cmake is a bit tedious. The best I can offer is to put
Code:
message(STATUS "**** Got here, variable=${variable}")
type checks into various places to see how far down the directory structure cmake actually gets. For example, in <orbiterroot>/Sound/XRSound/CMakeLists.txt and below. It's not elegant, but I can't think of anything else at the moment.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,407
Reaction score
341
Points
83
Website
orbit.medphys.ucl.ac.uk
I found a difference in CMakeCache.txt. I get
Code:
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=108
whereas your value is 102. There are 6 CMakeLists.txt files in the Sound subtree, so the difference could come from your cmake skipping the Sound directory altogether. I have no idea why.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
No worries, I'll dig into this more on the weekend. (y)
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,163
Reaction score
1,496
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
Good news here @martins! I believe what happened before was that I was in the wrong Orbiter folder on my local system -- on the second test, I believe I was in my old cloned repo folder that was not a clean fetch, but was just an update of the previous Orbiter repository folder (sorry about that!). Tonight I did a clean repo clone to a new folder, and XRSound builds (and works!) as part of the Orbiter build now! :) Nice work!

One side note for all -- I was getting a CTD on orbiter_ng.exe startup 50% of the time from the trigger_sound_build_cmake branch (which was forked off an older version of main), and after tracing the cause, it turns out that intermittent startup CTD as well as the rest of the x64 pointer truncation warnings are already fixed in the main branch. So if anyone is running an older version of main, you will want to pull the latest main branch changes to fix that potential CTD on startup.
 

Sbb1413

Add-on developer and tester
Joined
Aug 14, 2018
Messages
947
Reaction score
367
Points
78
Location
India
Preferred Pronouns
he/his/him
It looks like XRSound will be integrated into the next version of Orbiter (Orbiter 2022?). I'm very excited to see this development, as future newcomers will no longer worry about the lack of sound in Orbiter.

Despite the bright side of this integration, I'm still worrying about larger size of future versions of Orbiter (if the size of the hypothetical Orbiter 2022 without XRSound will be 2.7 GB (conservative estimate), then the size of the hypothetical Orbiter 2022 with XRSound will be around 3 GB).
 
Last edited:

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,357
Reaction score
512
Points
153
Location
Vienna
Despite the bright side of this integration, I'm still worrying about larger size of future versions of Orbiter (if the size of the hypothetical Orbiter 2022 without XRSound will be 2.7 GB (conservative estimate), then the size of the hypothetical Orbiter 2022 with XRSound will be around 3 GB).
It is the texture trees that make it big, not the various core elements. My current work folder (also containing the whole CMake gruft) with basic textures, D3D9Client and XRSound (incl. sound files), but without texture trees amounts to 900MB and zips down to 375MB. And this is with debug builds, mind you.
If we think about download sizes, instead of worrying about core elements we should worry about the texture trees and their distribution going forward.

However, these days people load 40GB just to try out games from Epic. Orbiter seems to be in good company.
 
Top