Closed sagamusix closed 2 years ago
@sagamusix A question, as someone with very little knowledge of the finer points of Amiga audio... Is this something that we'd want to have enabled all the time? Or should it be exposed as a config option in Cowbell, so that on the Demozoo side we enable it just for things that are identified as Amiga modules? (And if so, what criteria do we use to decide that? Just the ones that explicitly have Amiga as a platform?)
Also, I assume this code needs to run after a module has been loaded, not just on the initial load of the library, right...?
The Amiga resampler is only used for Amiga modules, so e.g. 8-channel MODs never use it even if it's enabled. It's safe to always enable this option. As it's set on the module itself, it has to be done for each module that is loaded.
Thanks! Done in d0c4856a8445187f06194245d1aa70394be7ce86.
(For the record: the build option now seems to be export LDFLAGS="-s \"EXPORTED_RUNTIME_METHODS=['stackAlloc','stackSave','stackRestore']\""
)
The Amiga resampler enables crisp emulation of the Paula chip.
Here's what I do to enable it:
You may need to export several extra functions when building libopenmpt:
export CXXFLAGS="-s \"EXTRA_EXPORTED_RUNTIME_METHODS=['stackAlloc','stackSave','stackRestore']\""
(I think at the time of writing only stackAlloc is required, the others are still exported implicitly, but seeing Emscripten's changelog, it is only a matter of time until that changes 😛 )