atsb / Doom64EX-Plus

An improved modern version of Doom64EX.
GNU General Public License v2.0
102 stars 17 forks source link

Fully replace SDL callback with something else for fluidlite #115

Closed atsb closed 1 year ago

atsb commented 1 year ago

Making this to document and track it. I’ve done as much as I can about the sdl2 callback to fluidsynth but every now and then it crashes the game within the callback.

We definitely should replace it. Maybe with the mus2mid code of chocolate doom? It’s probably the most compatible

Wolf3s commented 1 year ago

What about fluidlite?

atsb commented 1 year ago

If we can get a good audio implementation going with fluidlite then that’s fine. It’s just the sdl2 callback isn’t so stable. Maybe an openal or SDL Mixer version would be better. I do really like fluidlite, it’s only this one little issue that creeps up.

atsb commented 1 year ago

The fluidlite repo has some examples in their issues with things like using Sokol audio alongside. But I haven’t had much success with using the code

atsb commented 1 year ago

Here: https://github.com/divideconcept/FluidLite/issues/22

Wolf3s commented 1 year ago

If we can get a good audio implementation going with fluidlite then that’s fine. It’s just the sdl2 callback isn’t so stable. Maybe an openal or SDL Mixer version would be better. I do really like fluidlite, it’s only this one little issue that creeps up.

This cool because this opens a lack of possibilities of porting

atsb commented 1 year ago

It’s very flexible and portable yeah, probably something with how we are using it is the issue

bfg01 commented 1 year ago

Sorry beforehand for the noob question; but, would this be related to finally making it completely independent of pulseaudio on Linux, and instead -or at least as option- sound working with ALSA or Apulse?

atsb commented 1 year ago

Sadly no. Fluidlite still uses libpulse for midi, so it will always require at least that, unless we completely remove the sound backend and code another one.

atsb commented 1 year ago

Ok so for now, I'm using Kaiser's fluidsynth version which is based on the 1.1 series rather than fluidlite which is much more recent. One of the functions was changed completely between these versions and would crash EX+ - Kaiser's version does not.

@bfg01 - to solve the pulseaudio issue, I will compile versions of Kaiser's fluidsynth library for x64 linux and will do that on Debian so it would be using older LIBC versions, which should be compatible with nearly everyone. I'll bundle it into the repo and change the build scripts to link to it. This way, it would be using SDL2 for all audio and fluidsynth only for reading the MIDI tracks.

Wolf3s commented 1 year ago

Closed because the issue #151 is the continuation of this one.