libgme / game-music-emu

Blargg's video game music emulation library, which allows audio applications to easily add playback support for the music of many classic video game consoles.
GNU Lesser General Public License v2.1
72 stars 14 forks source link

Distorted tempo flow of HES music #33

Closed Wohlstand closed 5 years ago

Wohlstand commented 5 years ago

Original report by Wohlstand (Bitbucket: Wohlstand, GitHub: Wohlstand).


Idk what happen, however, I see the HES music playback is totally distorted and goes very inaccurate…

I have included a sample file for testing.

P.S. For a testing reason, I have tried to checkout ancient commits and test out the working: on the bf60977406d05ae6c81ea85bbc3d4a85f6ac31e5 state, HES music working fine… :thinking:

I’ll try to fix the thing myself…

Wohlstand commented 5 years ago

Original comment by Wohlstand (Bitbucket: Wohlstand, GitHub: Wohlstand).


Okay, I have found a reason of this crap:

Do you see here all f*int* was replaced with *int*_t? Look carefully:
fint16 originally was defined as int which is… 32-bit integer!!!

So, when you have declared int16_t you have put 16-bit integer, which makes… confusion of the time value and strong playback distorsion!!!

Wohlstand commented 5 years ago

Original comment by Wohlstand (Bitbucket: Wohlstand, GitHub: Wohlstand).


So, I gonna to replace all *int16_t with 32-bit integers to also fix some other mistakes are was here a whole age…

Wohlstand commented 5 years ago

Original comment by Wohlstand (Bitbucket: Wohlstand, GitHub: Wohlstand).


I made a PR with a fix: https://bitbucket.org/mpyne/game-music-emu/pull-requests/13

Wohlstand commented 5 years ago

Original comment by Michael Pyne (Bitbucket: mpyne, GitHub: mpyne).


Resolved with PR #13.