Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
811 stars 66 forks source link

Play music #184

Closed donnierussellii closed 6 years ago

donnierussellii commented 6 years ago

This work is based on Interrupt's adl-mark-2 branch and my multithreaded ReadXMI code, which is based on SSPLAYER ( https://wenchy.net/old/shock.html ).

The music ai is preserved from master, with tweaked adl code added in and a rewritten/cleaned up setup.c for looping title and credits music.

This reads midi messages from XMI files (and track numbers from BIN files), sends the messages to adlmidi, which fills a stream buffer that is sent to SDL audio. Buffer size raised to 4096.

Added code to repeat shorter pieces while longer superchunk plays.

Note that setup.c is heavily edited, but care was taken.