s25client icon indicating copy to clipboard operation
s25client copied to clipboard

Remove OGG files from repo

Open Flamefire opened this issue 7 years ago • 15 comments

Currently we include the OGG files in the repo although they are just converted versions of the SNG_*.DAT files. Those can be converted on the fly just like the images, so we don't need to include them. Especially as they are not included in the release but downloaded from the server on first start leading to no sound if the exe is started directly.

@Spikeone Can you verify that the converted sounds are good enough? Use the lstpacker.zip Just put it next to the GFX folder and drop a SNG*.DAT onto it

Flamefire avatar Dec 04 '18 15:12 Flamefire

Can those OGG files be provided at all? This could be a problem with copyright?

baka0815 avatar Dec 04 '18 17:12 baka0815

Not sure what their origin is. Until now it was not possible to directly convert them (by us), so they might come from another source. But this is another reason to remove them

Flamefire avatar Dec 04 '18 17:12 Flamefire

@Flamefire the (new?) lstpacker just crashes as soon as I drag a SNG_*.DAT or *.LST file onto it.

Spikeone avatar Dec 04 '18 19:12 Spikeone

Crashes? Run it from a console with the file to unpack as an argument and tell me more details please

Flamefire avatar Dec 04 '18 21:12 Flamefire

Did so (had to find out it must be at the same level as s25client.exe is as the pal5.bbm isn't found otherwise).

lstpacker

Spikeone avatar Dec 04 '18 21:12 Spikeone

Wow... The crash comes from the space in the command line param. Boost.Program_Options cannot handle paths -.-

Flamefire avatar Dec 09 '18 17:12 Flamefire

At least my folder is now properly named ;)

Songs sound good engouh to me - so we can convert them on the fly (and finally ppl. have no need to run rttr.bat to have music)

Spikeone avatar Dec 09 '18 20:12 Spikeone

the reason why we had to preconvert them was that under linux you need a proper midi player installed, etc. otherwise the conversion sounds ugly or doesnt work at all. on windows "everything" was perfect at that point. But it was 10 years ago, so perhaps it will work now

Flow86 avatar Dec 09 '18 20:12 Flow86

the reason why we had to preconvert them was that under linux you need a proper midi player installed, etc. otherwise the conversion sounds ugly or doesnt work at all.

Prior to https://github.com/Return-To-The-Roots/libsiedler2/commit/e87e01eff9e7972e2662f738802540806a273009 the library could not unpack those files under any OS. Was a different converter used back then? And isn't SDL responsible for the playback or does it use a system midi player?

Flamefire avatar Dec 10 '18 08:12 Flamefire

otherwise the conversion sounds ugly or doesnt work at al

Still an issue -.- I first got an error about missing /etc/timidity/freepats.cfg and after installing freepats package the sound is not correct. On windows all is fine though

Flamefire avatar Dec 10 '18 08:12 Flamefire

Found a GPL3 software midi player: https://github.com/bisqwit/adlmidi It needs major stripping down and possibly removing of questionable soundbanks/fonts
Tested it on Linux and it produces correct sound

Alternative: library fork of that: https://github.com/Wohlstand/libADLMIDI. Seems to provide what we need but has a C interface only and also in need of some cleanup, but much better. Possibly read to use

Flamefire avatar Dec 12 '18 16:12 Flamefire

The differences listed at https://github.com/Wohlstand/libADLMIDI sound like it would be good to go with that way (see below). Also the latter is based on the former, so the implementation should generally be similar.

Reverb code has been removed. Doesn't contains platform specific code. Library can be used with various purposes include making of a custom music decoders for a media players and usage with a games. Supports custom non-hardcoded WOPL banks and ability to build without of embedded banks

baka0815 avatar Dec 14 '18 11:12 baka0815

Exactly. The original is a pretty messy all-in-one executable. I'd remove everything that is not needed including that "platform specific code" (which is more like: If(windows) use_native_player(); else use_crossplatform_player())

The "problem" with the libADLMIDI is that it contains a lot that is not required although most should be removable by setting CMake vars.

Flamefire avatar Dec 14 '18 11:12 Flamefire

@Flamefire @Flow86 aren't we converting the files now when first starting the game?

Spikeone avatar Apr 19 '20 12:04 Spikeone

We currently only resample wav files from the S2 sample rate to something reasonable.

We still have the ogg files because nothing can play midi files properly.

Flamefire avatar Apr 19 '20 13:04 Flamefire