Problems with building orbiter because of irrKlang

How hard is to move from irrKland to something else? For example SDL2/SDL3 and forget these weird external dependencies.

Probably doable, but not a simple task. It would require rewriting a fair bit of the XRSound code, and it's not something I have time to implement. However, another developer (or group of developers) could work on that as XRSound version 3 in a separate branch. From what I'm reading, SLDL3 + SDL3_mixer is cross-platform like irrKlang, so SDL3 appears to at least meet the minimum requirements.
 
Probably doable, but not a simple task. It would require rewriting a fair bit of the XRSound code, and it's not something I have time to implement. However, another developer (or group of developers) could work on that as XRSound version 3 in a separate branch. From what I'm reading, SLDL3 + SDL3_mixer is cross-platform like irrKlang, so SDL3 appears to at least meet the minimum requirements.
Just curious. What functionality XRSound use from irrKlang? Like play wav/mp3/etc. Any audio panning, positioning? What else?
 
Just curious. What functionality XRSound use from irrKlang? Like play wav/mp3/etc. Any audio panning, positioning? What else?

Everything. If you are familiar with software engineering, you can browse through the XRSound source code to see how it calls the irrKlang library. It's a lot of work to switch to a different sound engine, but as I said, it's doable with enough time, effort, and testing.
 
In order to use a .dll file, the application being built has to compile using the import library (.lib) and .h include file(s) for that DLL. And those files are all in the public GitHub repository for irrKlang. What if the Orbiter build script would just pull the irrKlang .h and .lib files it needs to link with irrKlang.dll from the irrKlang GitHub repository (git clone https://github.com/jonas2602/irrKlang works for me locally), while pulling the redistributable irrKlang.dll from the Orbiter repository? That way, nothing from irrKlang is being redistributed except for irrKlang.dll, and we aren't rehosting any irrKlang files except the redistributable ones spelled out in the irrKlang license.
I'll have a look at making it do this as a better solution than just disabling xrsound entirely; it's definitely less work than replacing irrKlang itself.

If we're considering using SDL elsewhere as discussed, using its sound engine might make sense anyway for reasons that aren't relevant to why this broke, but we can have that discussion when there's a realistic prospect of the project happening and we've sorted out how to get SDL in the first place.
 
I'll have a look at making it do this as a better solution than just disabling xrsound entirely; it's definitely less work than replacing irrKlang itself.

If we're considering using SDL elsewhere as discussed, using its sound engine might make sense anyway for reasons that aren't relevant to why this broke, but we can have that discussion when there's a realistic prospect of the project happening and we've sorted out how to get SDL in the first place.
So I made an initial pass at this, and while it builds OK the luainterpreter segfaults during initialisation in the test phase (great that we have this!). I suspect this is down to a mismatch between the irrKlang.lib and irrKlang.dll files I've supplied it; the .lib files come from the repo @dbeachy1 noted, while the .dll files are taken from the irrKlang distribution packages directly. They're version-matched, so should be compatible, but... something is clearly not working. I'll devote some more time to it when I have some.
 
So I made an initial pass at this, and while it builds OK the luainterpreter segfaults during initialisation in the test phase (great that we have this!). I suspect this is down to a mismatch between the irrKlang.lib and irrKlang.dll files I've supplied it; the .lib files come from the repo @dbeachy1 noted, while the .dll files are taken from the irrKlang distribution packages directly. They're version-matched, so should be compatible, but... something is clearly not working. I'll devote some more time to it when I have some.
I have an SDL3_Mixer prototype but some things are bothering me :
  • There is no official version yet and worst still, you have to use untagged versions for both SDL3_mixer and SDL3
  • It feels like the sound gets really saturated compared to irrklang or OpenAL
Edit : there's a draft here : https://github.com/orbitersim/orbiter/pull/598
 
Last edited:
Yes, you have to compile on Windows that specific branch
I think we should open a new thread for what will be the port of XRSound to SDL3_Mixer.

In the meantime, I'm going to figure out what I did wrong compiling Orbiter on my Windows 11, because the program won't start.
Is there any thread with "official" instructions on how to build under Windows?
 
I think we should open a new thread for what will be the port of XRSound to SDL3_Mixer.

In the meantime, I'm going to figure out what I did wrong compiling Orbiter on my Windows 11, because the program won't start.
Is there any thread with "official" instructions on how to build under Windows?
If you manage to get the compilation to completion, it should work... Here's what I do to work on this :
1 - Open visual studio from where you cloned the orbiter repo (I use VS2022)
open.png

2 - Choose the configuration
configuration.png
3 - wait for cmake
cmake.png
4 - compile/install
install.png
5 - wait some more (sometimes there are errors about a missing lua.ilk, just retry...)
installed.png
6 - start a "git bash"
gitbash.png
7 - launch
launch.png
8 - debug
debug.png

I'm sure there are better ways to do this but it works for me.
 
Anyone had any success trying the SDL3_mixer version?
Booting windows to try it out is a massive obstacle, since I live in linux all the time now. But I will try to make some time to have a go of it.
 
If you manage to get the compilation to completion, it should work... Here's what I do to work on this :
1 - Open visual studio from where you cloned the orbiter repo (I use VS2022)
View attachment 45246

2 - Choose the configuration
View attachment 45248
3 - wait for cmake
View attachment 45249
4 - compile/install
View attachment 45250
5 - wait some more (sometimes there are errors about a missing lua.ilk, just retry...)
View attachment 45251
6 - start a "git bash"
View attachment 45252
7 - launch
View attachment 45253
8 - debug
View attachment 45254

I'm sure there are better ways to do this but it works for me.
I cloned the Git repository with this command. Is this correct?

git clone --branch sdl3_mixer --single-branch --recurse-submodules https://github.com/TheGondos/orbiter.git

Because I can't find x86 Debug in the configurations.
 
Booting windows to try it out is a massive obstacle, since I live in linux all the time now. But I will try to make some time to have a go of it.
Is there a way to have github archive the build products for this branch?
 
I cloned the Git repository with this command. Is this correct?

git clone --branch sdl3_mixer --single-branch --recurse-submodules https://github.com/TheGondos/orbiter.git

Because I can't find x86 Debug in the configurations.
This is strange, which version of visual studio do you have? With the 2017 version sometimes I had to delete the CMakePresets.json file for it to work.
 
So I made an initial pass at this, and while it builds OK the luainterpreter segfaults during initialisation in the test phase (great that we have this!). I suspect this is down to a mismatch between the irrKlang.lib and irrKlang.dll files I've supplied it; the .lib files come from the repo @dbeachy1 noted, while the .dll files are taken from the irrKlang distribution packages directly. They're version-matched, so should be compatible, but... something is clearly not working. I'll devote some more time to it when I have some.
This turned out to be something else, related to other changes I made while making the XRSOUND flag actually toggle XRSound. I reverted those changes and made the irrklang download pull from the copy archive.org has instead. Their hosting of it does technically violate the irrklang license, but pulling from them doesn't, as far as I can tell. And it works, so XRSound will be available in dev builds again from tonight's.
 
Is there a way to have github archive the build products for this branch?
I could have it cut a build off your branch instead of main, which would replace the current nightly build for a day at least. We didn't really design the workflow for arbitrary builds from non-mainline branches
 
Back
Top