Skip to content

Instantly share code, notes, and snippets.

@mistydemeo
Created October 17, 2013 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mistydemeo/f6e0c6e716b3e8a57939 to your computer and use it in GitHub Desktop.
Save mistydemeo/f6e0c6e716b3e8a57939 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <unistd.h>
#include "gme/gme.h"
int main(int argc, char **argv)
{
Music_Emu *emu;
gme_open_file(argv[1], &emu, 44100);
gme_start_track(emu, 0);
short buf[4096];
while (!gme_track_ended(emu))
{
gme_play(emu, 4096, buf);
write(STDOUT_FILENO, buf, 4096);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment