It works mostly fine, if I increase the frame size higher than 120, the game crashes right after the loop point (I wonder if the 0x04 magic number could be related?). Also forgot to mention that for non-looping files, loop_end needs to have the same value as sample_num, otherwise the music never...