Exemple #1
0
void InitApi()
{
	// This is a placeholder till there is actually some way to choose Apis. For the moment, just
	// Modify this so it does whichever one you want to use.
#ifdef _WIN32
	InitDSound();
#else
#if defined(ZEROSPU2_ALSA)
	InitAlsa();
#elif defined(ZEROSPU2_OSS)
	InitOSS();
#elif defined(ZEROSPU2_PORTAUDIO)
	InitPortAudio();
#endif
#endif
}
Exemple #2
0
int InitSound(int on)
{
    int r;

    AddFinalize(QuitSound);
    ZeroMemory(&sbuf, sizeof(struct Sbuf) * MAX_SBUF_SIZE);
    if (on) {
        LoadSound = load_sound;
    } else {
        LoadSound = load_sound_dummy;
    }
    r = InitDSound(hWnd);
    if (!r) {
        LoadSound = load_sound_dummy;        
    }
    return 1;
}