Skip to content

Add support for .mod, .s3m, .xm and .it formats

These formats worked at one point, but then something changed in how the package got built. This not only influences SDL2, but python-pygame, and that in turn pysolfc. The packaged version of pysolfc does not need these formats, but pysolfc has a separate package, pysol-music which contains music for the game, in 3 of the 4 formats, listed here. (https://github.com/shlomif/pysol-music) This package is not in official repos, I have packaged it in the AUR, which as I said worked in the past, but not anymore. (https://aur.archlinux.org/packages/pysolfc-music)

I have tested that the changes work, with the following python script, using python-pygame:

import pygame.mixer
import pygame.mixer_music
import time

pygame.mixer.pre_init(44100, -16, 2, 1024*1)
pygame.mixer.init()

pygame.mixer_music.load("./Astral_Dreams.it")
pygame.mixer_music.set_volume(1)
pygame.mixer_music.play()
while pygame.mixer_music and pygame.mixer_music.get_busy():
    time.sleep(0.2)

The music files from pysol-music can be tested. I also tested that in pysolfc itself they can be played, after the rebuilt sdl2_mixer is installed. I have made multiple issues in the past: https://github.com/pygame/pygame/issues/4365 https://github.com/shlomif/PySolFC/issues/396

Then saw that someone referenced the issue in msys2 and it also got fixed: https://github.com/msys2/MINGW-packages/issues/22517 https://github.com/msys2/MINGW-packages/pull/22521

The change was lifted from there.

Merge request reports

Loading