I just discovered a nice sound file format: XM
include \masm32\MasmBasic\MasmBasic.inc ; download
Init
UnzipInit 100
FileWrite "tmp.dll", UnzipFile(1)
Dll "tmp"
Declare bmInit, 3 Alias "BASSMOD_Init"
Declare bmFree, 0 Alias "BASSMOD_Free"
Declare bmLoad, 5 Alias "BASSMOD_MusicLoad"
Declare bmPlay, 0 Alias "BASSMOD_MusicPlay"
void bmInit(-1, 44100, 0)
.if bmLoad(1, Cat$(UnzipFile(0)), 0, 0, 8710)
void bmPlay()
Inkey "Hit any key to stop the music"
.endif
void bmFree()
FreeDll 2
Kill "tmp.dll"
EndOfCodePlenty of sample files are
at the Mod Archive. The exe includes a version of
Ian Luck's BassMod.dll.
Source & exe in the first attachment, to build it you need also the second one containing the resources.
Tested on Win7-64 and Win10 - just double-click on PlayXM.exe and ignore the security warnings
