-
-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jukebox not working in the flatpak version #6873
Comments
When the jukebox shows track names and not an empty playlist, it indicates that the music files are found and are readable without issue. (The baseset search routine hashes all the requested files, i.e. the MIDI files, and compares the hash to a target in the baseset definition. If the files can't be read or the hashes don't match, loading a baseset fails.) If the jukebox just cycles between tracks quickly, it indicates that the MIDI driver isn't able to start playback. It appears you're including libtimidity and freepats in your package, which ought to work, but I haven't personally tried any of the music code on non-Windows systems. The other potential failure mode would be changing slowly, as if the tracks are playing but without producing sound. Try starting OpenTTD with commandline parameters |
I'm not sure if this is the final verdict, but my current result testing this is that After hacking the build to include libtimidity.cpp (not a proper fix) it appears that it doesn't get correct file names to the MIDI files, but that's a different issue probably introduced in my reworking of the music code, and shouldn't be present in 1.8.0 or earlier. So: Can you confirm whether |
libtimidity has never been built in the Linux builds, it was added for the PSP port only. Linux builds use extmidi, which by default is set up to spawn timidity directly. It's likely enough that this doesn't work properly in a flatpak environment which I understand is sandboxed in some way. |
That probably explains the issue then. The flatpak package tries to build with libtimidity but it doesn't get included since it's not designed to be included in non-PSP builds. So when the game runs, it instead tries to use extmidi to call an external timidity command to play, which fails because there isn't access to any command for playback. |
Could we patch the build system to include it regardless? Would that solve the issue? |
As a note, #6611 has a patch for a Fluidsynth driver, which might be more reliable. At least in my testing, Timidity is difficult to get working. |
Do you want me to try a build with the patch and drop timidity altogether? |
It's worth a try. Note that patch won't work against current master, but should work against tag 1.8.0. Otherwise, just build with extmidi (that's default on Linux builds) and either include a Timidity++ executable that can get called, or configure with |
To sum up, the options are:
With option 3 likely becoming the default choice for OpenTTD on Linux in the future, correct? |
I applied the following patch (the original one did not apply cleanly on top of And the build seems to acknowledge the presence of
But the jukebox is not working yet. Do I need the |
First thing to check is which music driver actually gets selected, or force the game to use fluidsynth in the config file. Try setting |
I get: |
Well there's your answer for now, the driver isn't actually being compiled in. Unfortunately I don't have time to look at the fluidsynth patch myself, right now. |
Unless I've misunderstood the code, fluidsynth.cpp/h isn't actually made use of anywhere in that patch - it's not included or used by any existing code. Missing part of the patch maybe? |
@LordAro here is the original patch. The latter did not apply cleanly on top of I suppose |
@nielsmh To answer your earlier question:
It's not, despite |
@nielsmh @LordAro Any idea what else I could try? I have a feeling |
I also had this issue on my Ubuntu PC 16.04. Hope this can help |
Nothing functionally, other than some minor updates to make it compile with master |
Any idea when the next release is due ?
Le sam. 5 janv. 2019 à 17:29, Niels Martin Hansen <notifications@github.com>
a écrit :
… With Fluidsynth support added in #6901
<#6901> and #7012
<#7012> I think this is fixed for
the next release.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6873 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB36b2_kPzN0tq1no8WMLjC48vUlMacbks5vANMEgaJpZM4Vm8nt>
.
|
Usually a new release is made in April. |
I have updated the flatpak packaging with the new release of OpenTTD and enabled compilation with Fluidsynth. Still, no jukebox output unfortunately. Could you please reopen this bug whilst I work on fixing it? Also, is the C library alone enough for MIDI support via Fluidsynth, or is the fluidsynth executable also required at runtime? |
The C library should be enough, nothing in the OpenTTD Fluidsynth music driver code calls out to an external program. The driver is written against Fluidsynth 1.11, I think it's API compatible with Fluidsynth 2 but not entirely sure. |
Thanks @nielsmh for your pointers. I started off by downgrading the version of FluidSynth from 2.0.4 to 1.1.11. We'll see how it goes. |
Sadly, I am still unsuccessful with this :-( |
I finally got it working by installing the missing soundfont and patching the code to inject the Flatpak specific path. Please consider merging #7522 eventually. |
Thanks for your time to figure this out and fix it - I've been missing the music. 🙂 |
Going to close this as it looks like there's a solution in #7522. Feel free to request a reopen if this isn't the case |
A user of the flatpak version of OpenTTD reported an issue with the jukebox not playing any music. Indeed, the jukebox just keeps cycling through the original playlist without any playback.
Any ideas what could be causing this? How are the respective path to the individual tracks composing the playlist managed in the application?
The text was updated successfully, but these errors were encountered: