fabiangreffrath / taradino

SDL2 port of Rise of the Triad
GNU General Public License v2.0
29 stars 8 forks source link

Music doesn't play if you don't launch from the terminal #76

Closed erysdren closed 1 month ago

erysdren commented 1 month ago

If I launch the current version of Taradino from my KDE Plasma application launcher (or from Dolphin or any other file manager) there is sound, but no music. If I launch from the terminal, there is music and sound. I can only assume this has something to do with SDL_Mixer, or maybe something to do with user privileges. Not sure.

fabiangreffrath commented 1 month ago

Is this related to this commit? https://github.com/fabiangreffrath/taradino/commit/e8cc09740a82ab018c0f03511b45f5a1743842b8

erysdren commented 1 month ago

I figured it out. I use the KDE Plasma desktop environment, and when launched from the .desktop file, the SDL_SOUNDFONTS environment variable wasn't set. It seems like SDL_Mixer + Fluidsynth relies on this variable exclusively to find the sf2 file? Anyways, adding that to my Plasma-specific environment variables list fixed it.