#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include "d:\dsik\dsik\include\audio.h"
#include "d:\dsik\dsik\include\timer.h"
#include "d:\dsik\dsik\include\import.h"

    void init(void)
    {
        SoundCard SC;
        DSM *M;

        dRegisterDrivers();
        if (dLoadSetup(&SC,"SETUP.CFG") || dInit(&SC))
            exit(EXIT_FAILURE);
        atexit(dDone);
        if (!(M = dImportModule("dk2.s3m",FORM_S3M)))
            exit(EXIT_FAILURE);
        dSetupVoices(M->Header.NumTracks,M->Header.MasterVolume);
        dPlayMusic(M);
        dInitTimer();
        atexit(dDoneTimer);
        dStartTimer(dPoll,TICKS(70));
    }

void main(void)
{
        init();
        while(!kbhit()) printf(".");
}
