Example #1
0
void initPlayer() {
    MIDASstartup();
    MIDASinit();
    MIDASsetTimerCallbacks(70000, FALSE, &PreVR, &immVR, NULL/*&inVR*/);
    module = MIDASloadModule("epic.mod");
    playHandle = MIDASplayModule(module, TRUE);
    MIDASstartBackgroundPlay(0);
}
Example #2
0
File: musa.cpp Project: visy/turha
int musainit()
{
        midasSetDefaults();
        MIDASstartup();
        if (!MIDASdetectSoundCard()) MIDASerror();
        refreshRate = MIDASgetDisplayRefreshRate();
        if ( refreshRate == 0 ) {
/*                cout << "Warning! Unable to synchronize to display refresh!\n";
                if ( getch() == 27 ) return 0;*/
                refreshRate = 70000; /* default 70Hz */
        }
        if ( !MIDASinit() ) MIDASerror();
        if ( (error = vuInit()) != OK )
                midasError(error);
        if ( !MIDASsetTimerCallbacks(refreshRate, TRUE, &prevr, NULL, NULL) )
                MIDASerror();
        return 0;
}