WohlSoft / SDL-Mixer-X

SDL Mixer X (Or "MixerX" shortly) - An audio mixer library based on the SDL library, a fork of SDL_mixer
https://wohlsoft.github.io/SDL-Mixer-X/
Other
103 stars 26 forks source link

Broken .vgm playback #49

Open SAJewers opened 2 years ago

SAJewers commented 2 years ago

It seems that .vgm files that are not just Genesis/MD rips from https://project2612.org/ don't 100% play correctly.

Stuff from https://vgmrips.net/ or made with Deflemask won't seem to play right, for example the drum track in the below vgm: https://www.dropbox.com/s/agvzwoyips9sgdg/Castlevania%20Dracula%20X%20-%20Bloodlines.vgm?dl=0

Wohlstand commented 2 years ago

The major difference between MegaDrive rips and Deflemask-crafted files is that they use different ways of sample playback:

This file uses the sort of "PCM database" style which doesn't work in the VGM module implemented at the libGME library used here. I could make an attempt to implement the support for this. Until to start the work I'll make an issue on the GME side. Once I get a moment, I'll try to implement some, otherwise, somebody also could contribute that.

Wohlstand commented 2 years ago

There is sort of these data blocks :thinking: https://vgmrips.net/wiki/VGM_Specification#Data_blocks

Wohlstand commented 2 years ago

Alternatively, I could pick up this thing to use as an alternative for VGM format exclusively

freq-mod commented 2 years ago

I would like to recommend libvgm too, it's much more "modern" than GME

Wohlstand commented 2 years ago

The only con I just now found at libVGM it completely lacks the C-API, which will need me to make the C++-based module to integrate it, so, on platforms where C++ sucks, this module will not work. At least, the big proc of MixerX it's modular and it's possible to disable/enable every codec depending on purposes easily.

Wohlstand commented 2 years ago

I did a little dirty attempt to use libVGM, however, it didn't work properly yet, and also, it conflicts with libOPNMIDI on an attempt to statically link both libraries because of the MAME emulator code.

Wohlstand commented 2 years ago

Okay, after some moment I got it working, but it lacks some features:

Wohlstand commented 2 years ago

btw: tempo is really didn't implemented yet (see ValleyBell's reply: https://github.com/ValleyBell/libvgm/issues/87)

The tempo change is a very important thing as it's already used by some users with chiptunes, trackers, and MIDIs. So, waiting once ValleyBell will implement the tempo support. In parallel, try to implement the support for samples database at the GME...