doompanning/external/wildmidi-0.4.5/test/test.c
oxmox a191a82bdc Squashed 'src/dp_doom/' content from commit 1909924
git-subtree-dir: src/dp_doom
git-subtree-split: 190992421c7c643afc99d7f7c511c162f65bea85
2023-02-19 01:52:56 +01:00

16 lines
556 B
C

/* tiny, minimal C source for testing, e.g. running under valgrind. */
#include <stdio.h>
#include <wildmidi_lib.h>
midi *song;
int main (int argc, char **argv) {
if (argc != 2) return 1;
if (WildMidi_Init("wildmidi.cfg", 44100, 0) != 0) return 1;
song = WildMidi_Open (argv[1]);
#if defined(LIBWILDMIDI_VERSION) && (LIBWILDMIDI_VERSION-0 >= 0x000400L)
if (!song) fprintf(stderr, "%s\n", WildMidi_GetError());
#endif
WildMidi_MasterVolume (100);
if (song) WildMidi_Close(song);
WildMidi_Shutdown();
return (song == NULL);
}