Skip to content

Instantly share code, notes, and snippets.

@STRd6
Created April 4, 2012 23:53
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 STRd6/2306661 to your computer and use it in GitHub Desktop.
Save STRd6/2306661 to your computer and use it in GitHub Desktop.
#include "Extractor.h"
#include "XModule.h"
#include <iostream>
using namespace std;
int main ()
{
XModule* module = new XModule();
SYSCHAR* fileName = "Greensleeves.xm";
cout << fileName;
if (!XMFile::exists(fileName))
return false;
cout << " exists!\n" << flush;
mp_sint32 nRes = module->loadModule(fileName);
// unknown format
if (nRes == -9) {
cout << "Unknown format\n";
} else if (nRes < 0) {
cout << "Error code: " << nRes << "\n";
} else {
cout << "Sucessfully loaded?";
cout << module->getNumUsedInstruments() << "\n";
}
cout << flush;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment