nmlgc / ssg

秋霜玉 / Shuusou Gyoku
MIT License
20 stars 5 forks source link

Backport SDL 2-dependent new input/sound/platform features to Windows 98 #53

Open nmlgc opened 10 months ago

nmlgc commented 10 months ago

SDL 2 doesn't work on Windows 98 by default, which means that the i586 builds are going to miss out on the following features:

Making these work on Windows 98 could be done in two ways: 1) Get SDL 2 running on Windows 98 after all, forking it if necessary. More expensive, but would benefit every SDL 2 game. Bonus points for getting SDL 2 to run without KernelEx. 2) Backport all features to the original DirectInput and DirectSound backends. Cheaper, but will only cover Shuusou Gyoku.

It's up to the backers to decide which strategy I go with.

nmlgc commented 6 months ago

Turns out that miniaudio has two disadvantages when it comes to the features needed for #9:

  1. It doesn't provide APIs for accessing FLAC or Ogg metadata, even though its vendored libraries have the code for it.
  2. Its fader is linear rather than logarithmic, with no way to customize it.

With 1) forcing me to separately include the same libraries anyway, I've moved FLAC/Vorbis decoding and fading to the platform-independent game layer, using an adapted version of thcrap's BGM streaming code. miniaudio now only receives the raw audio stream, which means that we only ended up using it for features that DirectSound also supports.

Thus, it would make slightly more sense to go for 2) in the case of sound. Then, we not only get FLAC/Vorbis BGM modding on Windows 98, but even the modern SDL Windows build could ditch miniaudio and go back to DirectSound, reducing binary size and release build link times.

nmlgc commented 3 months ago

Option 1 (porting SDL 2 to Windows 98) has received €62.50 in microtransaction funding from M0003.