EXPERIMENTAL native host system sound device output for OpenMPT on Wine on Linux

Started by manx, February 26, 2017, 14:50:21

Previous topic - Next topic

manx

Quote from: monsterovich on October 05, 2017, 22:48:36
https://pastebin.com/dpprgJTy
Can you please allow to build 32bit wrapper on 64bit system (-m32 or something)?

Theoretically possible, but certainly will not happen to be supported in the near future.

There is a hidden setting [WineSupport]ForeignOpenMPT. If you set that to 1, OpenMPT will try to build for non-native bitness, however that feature is unsupported and not very well tested and I cannot remember right now if it even ever worked even on Debian systems where I test mostly.


We do explicitly not provide active support for this situation though, because of various reasons:

The amount of differences between distributions in the way compiling for Wine is already amazingly huge as it is, even when only targeting the native platform. Targeting foreign bitness will increase the amount of situations to support manyfold.

Library placement in the file system differs completely between Debian, Ubuntu, other Linux, other platforms (i.e. at least 4 ways to handle it). Some systems completely special case Wine and do not allow to even install general 32bit packages on 64bit systems at all. This implies having to consider which packages are even available there at all. Detecting available foreign packages is also not really portable (yes, pkg-config, but we would have to GUESS the actual host triplet and pkg-config path used for 32bit) (also, this would not be any easier when building by hand).

So no, this is an experimental feature, and only supports a subset of available configurations. You either have to use native bitness OpenMPT (and are thus limited to 64bit VST plugins due to the Wine UI rendering problem, though we might be able to provide a work-around for that sometime, albeit not soonish either), or use 32bit OpenMPT on your 64bit system and not use the Wine integration feature (WASAPI support in Wine and OpenMPT works nearly perfect these days, so you would not lose all that much anyway).

In any case, this is and will stay to be a highly experimental feature because it requires an unproportionally huge amount of development time to implement and test (the test matrix is incredibly huge, compared to other features), and I do not want to invest the time to extend the scope that much for ever so smaller diminishing returns.


We might support building by hand some time, but not right now.

DaVince

Reactivated my forum account to come in here and say thank you very much for this feature! This makes OpenMPT so much more usable on my preferred OS.

I also have a request: compiling Wine support failed for me for a while until I specifically went to these forums to search for help, at which point I stumbled upon this thread. The thread contains invaluable information for those who want to get this to work, but none of this info is available in any of the standard help docs or during any step where the compilation/native support fails. It might be a good idea to put the instructions on the wiki and link to it straight from the application itself (as well as the terminal window) when things go wrong, just to point people in the right direction. A link to this thread for support might also be good!

manx

Quote from: DaVince on January 13, 2018, 08:45:40
I also have a request: compiling Wine support failed for me for a while until I specifically went to these forums to search for help, at which point I stumbled upon this thread. The thread contains invaluable information for those who want to get this to work, but none of this info is available in any of the standard help docs or during any step where the compilation/native support fails. It might be a good idea to put the instructions on the wiki and link to it straight from the application itself (as well as the terminal window) when things go wrong, just to point people in the right direction. A link to this thread for support might also be good!

Uhm, it's documented at https://wiki.openmpt.org/Manual:_Setup/Wine. I do not see right now what information would be missing from the wiki, short of the list of tested configurations, for which it links to this precise thread.
We do not link to the precise wiki/manual page from any other  UI element in OpenMPT, and I do not think we should special case this.
I guess I could add a link in the error message when compilation fails, though - precisely because this is an experimental feature and known to fail under a lot of circumstances.


Quote from: DaVince on January 13, 2018, 08:45:40
Reactivated my forum account to come in here and say thank you very much for this feature! This makes OpenMPT so much more usable on my preferred OS.

Great to hear.
I'm curious though: What particular audio output problems do you experience when using the standard audio output methods in OpenMPT on Wine (and not using the native Wine integration features)? Which Wine version? Which distribution? What kind of audio setup on the Wine and side? Which OpenMPT output backend?

DaVince

Oh, sorry, I couldn't find that wiki article before, my bad!

QuoteI'm curious though: What particular audio output problems do you experience when using the standard audio output methods in OpenMPT on Wine (and not using the native Wine integration features)? Which Wine version? Which distribution? What kind of audio setup on the Wine and side? Which OpenMPT output backend?
For me, picking the sound options always meant there was a trade-off between having decent latency and making sure the audio doesn't become crackly. Having even a slight delay when entering notes is annoying, but it was necessary because setting the latency/period too low meant getting the crackles and audio glitches. Sometimes there's also a glitch where the entire song will play back way too quickly and sound all crackly. This has happened across any version of OpenMPT on any version of Xubuntu in the past years.

I've encountered neither of these cases when using the native Wine driver so far, and there's no noticeable lag either. It's great.

manx

Quote from: DaVince on January 13, 2018, 13:26:02
QuoteI'm curious though: What particular audio output problems do you experience when using the standard audio output methods in OpenMPT on Wine (and not using the native Wine integration features)? Which Wine version? Which distribution? What kind of audio setup on the Wine and side? Which OpenMPT output backend?
For me, picking the sound options always meant there was a trade-off between having decent latency and making sure the audio doesn't become crackly. Having even a slight delay when entering notes is annoying, but it was necessary because setting the latency/period too low meant getting the crackles and audio glitches. Sometimes there's also a glitch where the entire song will play back way too quickly and sound all crackly. This has happened across any version of OpenMPT on any version of Xubuntu in the past years.

I've encountered neither of these cases when using the native Wine driver so far, and there's no noticeable lag either. It's great.

Fair enough. Even though we have not been seeing any particular problems regarding sound output on any Ubuntu/Xubuntu version in the last couple of years - especially not when using the "WASAPI" output backend in OpenMPT.
However different systems behave differently, so we added the native Wine integration as another option for people like you who experience such problems.

s0m3guy

Hi, I'm running this on FreeBSD via WINE 9.0 and when it's compiling native libraries, it shows this error.

usr/include/sys/param.h:44:13 note: expanded from macro: 'BSD'
#define BSD 199506      /* System version (year & month). */
                     ^
1 error generated.
gmake: *** [build/wine/native_support.mk:208: src/openmpt/sounddevice/SoundDeviceManager.o] Error 1

manx

Quote from: s0m3guy on February 16, 2024, 13:20:12I'm running this on FreeBSD via WINE 9.0 and when it's compiling native libraries, it shows this error.
I currently do not have any FreeBSD install available for testing, but I guess r20133 (1.32) and r20134 (1.31) should probably fix this. Test builds will be available in a couple of hours at https://builds.openmpt.org/.

s0m3guy

Nice, I'm using r20151 and it successfully compiled for my system!