- bool retval = true;
- #define AL_FUNC(t,ret,fn,params,call,rt) \
- if (!lookup_alsym(#fn, (void **) &p##fn, libname)) retval = false;
- #include "alstubs.h"
- #undef AL_FUNC
-
- if (!retval)
- unload_alsyms();
-
- return retval;
-}
-#else
-#define lookup_all_alsyms(x) (true)
-#define unload_alsyms()
-#endif
-
-
-typedef struct
-{
- ALuint sid;
- FSOUND_SAMPLE *sample;
- bool startpaused;
-} OPENAL_Channels;
-
-typedef struct FSOUND_SAMPLE
-{
- ALuint bid; // buffer id.
- int mode;
-} FSOUND_SAMPLE;
-
-static size_t num_channels = 0;
-static OPENAL_Channels *channels = NULL;
-static bool initialized = false;
-
-
-void F_API OPENAL_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz)
-{
- if (!initialized) return;
- if (pos != NULL)
- alListener3f(AL_POSITION, pos[0], pos[1], -pos[2]);