2004-07-28 13:34:40 +02:00
|
|
|
#include "precompiled.h"
|
|
|
|
|
|
|
|
#include "lib.h"
|
|
|
|
|
|
|
|
#include "oal.h"
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma comment(lib, "openal32.lib")
|
|
|
|
#pragma comment(lib, "alut.lib")
|
|
|
|
#endif
|
|
|
|
|
2004-07-28 14:05:51 +02:00
|
|
|
|
2004-08-12 19:32:37 +02:00
|
|
|
|
|
|
|
// called as late as possible, i.e. the first time sound/music is played
|
|
|
|
// (either from module init there, or from the play routine itself).
|
|
|
|
// this delays library load, leading to faster perceived app startup.
|
|
|
|
// registers an atexit routine for cleanup.
|
|
|
|
// no harm if called more than once.
|
2004-07-28 13:34:40 +02:00
|
|
|
int oal_Init()
|
|
|
|
{
|
2004-08-12 19:32:37 +02:00
|
|
|
ONCE({
|
|
|
|
alutInit(0, 0);
|
|
|
|
atexit(alutExit);
|
|
|
|
});
|
2004-07-28 13:34:40 +02:00
|
|
|
|
|
|
|
return 0;
|
2004-07-31 17:51:49 +02:00
|
|
|
}
|