Closed asimilon closed 5 months ago
what happen if you try the -amigapreview command? Is the produced wav completly off, or does it sound good?
I need to do some proper testing with a .mod I'm more familiar with, but actually seems OK on the face of it. It never occurred to me that different platforms would create different outputs and yet still be valid. If all goes according to plan I'll rework my changes to be less destructive regards the original source and make a PR. Would you be happy with me removing the .sln, as can reproduce it from CMake and it keeps everything a bit tidier?
both .lsmusic and .lsbank files should be exactly identical on PC or MAC. If not, there is an issue we should fix. Using cmake for the MAC version is ok, but I want to keep the .sln for windows version. Doesn't need additional cmake to install and more user friendly for both visual studio and 10xeditor users :)
oh you're right, the issue is that "qsort" isn't stable across platforms. I just pushed a quick fix to make it stable. Just pull the new code and it should produce the exact same file on any platform.
Output is now identical on all platforms, thanks for fixing that!
With some minor edits I got the converter to compile on both macOS and Ubuntu in CLion, but there is a big issue with neither of the resulting binaries outputting the same
.lsmusic
as MSVC (.lsbank
is fine).This is more of a "is there anyone else out there who would like to get involved" request than an "issue" so to speak, unless Arnaud cares that it's not portable. 😉
You can find a
macOS
branch on my fork here : https://github.com/asimilon/LSPlayer which has aCMakeLists.txt
to make things more cross-platform,I've not been able to figure out thus far why the following is happening using
rink-a-dink.mod
as the test data:The first
0x194
bytes are identical, then it diverges like so:as you can see it's the same 16 bit words, but some of them are out of order, in different ways on the different platforms!
Until
0x34C
there is this issue with out-of-order words, after which they stay in sync until0x2924
where it starts going wrong again, but this time it's single bytes and I haven't seen any pattern about the differences.The first set of discrepencies arise from writing the
m_cmdEncoder
contents (https://github.com/asimilon/LSPlayer/blob/macOS/src/LSPEncoder.cpp#L1164), so when I am able I'm planning to do some debugging between Windows and macOS to see if I can figure out at which point the two platforms diverge. My "hunch" is that perhapsqsort
in https://github.com/asimilon/LSPlayer/blob/macOS/src/ValueEncoder.cpp#L155 is platform dependant, or certainly some aspect ofValueEncoder
is not behaving the same between the platforms.