genesis-3d_engine/Engine/addons/soundsystem/Framework.h

97 lines
2.9 KiB
C
Raw Permalink Normal View History

#ifndef _FRAMEWORK_H_ // Win32 version
#define _FRAMEWORK_H_
// Get some classic includes
#ifdef __WIN32__
#include<Windows.h>
#include<stdio.h>
#include<io.h>
#include<fcntl.h>
#include<conio.h>
#elif __ANDROID__
#include "core/android/precompiled.h"
#endif
#include "OpenAL/al.h"
#include "OpenAL/alc.h"
#include "OpenAL/efx.h"
#include "OpenAL/efx-creative.h"
#include "core/types.h"
// Initialization and shutdown
void ALFWInit();
void ALFWShutdown();
// OpenAL initialization and shutdown
bool ALFWInitOpenAL();
ALboolean ALFWShutdownOpenAL();
// File loading functions
bool ALFWLoadWaveToBuffer(const char* nameOrData, SizeT dataSize, ALuint uiBufferID, ALenum eXRAMBufferMode = 0, bool bOpenMemory = true);
// Extension Queries
ALboolean ALFWIsXRAMSupported();
ALboolean ALFWIsEFXSupported();
// Utilities
ALvoid ALFWprintf( const ALchar * x, ... );
ALchar *ALFWaddMediaPath(const ALchar *filename);
ALint ALFWKeyPress(void);
// EFX Extension function pointer variables
#ifndef AL_BUILD_LIBRARY
// Effect objects
extern LPALGENEFFECTS alGenEffects;
extern LPALDELETEEFFECTS alDeleteEffects;
extern LPALISEFFECT alIsEffect;
extern LPALEFFECTI alEffecti;
extern LPALEFFECTIV alEffectiv;
extern LPALEFFECTF alEffectf;
extern LPALEFFECTFV alEffectfv;
extern LPALGETEFFECTI alGetEffecti;
extern LPALGETEFFECTIV alGetEffectiv;
extern LPALGETEFFECTF alGetEffectf;
extern LPALGETEFFECTFV alGetEffectfv;
// Filter objects
extern LPALGENFILTERS alGenFilters;
extern LPALDELETEFILTERS alDeleteFilters;
extern LPALISFILTER alIsFilter;
extern LPALFILTERI alFilteri;
extern LPALFILTERIV alFilteriv;
extern LPALFILTERF alFilterf;
extern LPALFILTERFV alFilterfv;
extern LPALGETFILTERI alGetFilteri;
extern LPALGETFILTERIV alGetFilteriv;
extern LPALGETFILTERF alGetFilterf;
extern LPALGETFILTERFV alGetFilterfv;
// Auxiliary slot object
extern LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
extern LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
extern LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
extern LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
extern LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
extern LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
extern LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
extern LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
extern LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
extern LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
extern LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
#endif
// XRAM Extension function pointer variables and enum values
typedef ALboolean (__cdecl *LPEAXSETBUFFERMODE)(ALsizei n, ALuint *buffers, ALint value);
typedef ALenum (__cdecl *LPEAXGETBUFFERMODE)(ALuint buffer, ALint *value);
extern LPEAXSETBUFFERMODE eaxSetBufferMode;
extern LPEAXGETBUFFERMODE eaxGetBufferMode;
// X-RAM Enum values
extern ALenum eXRAMSize, eXRAMFree;
extern ALenum eXRAMAuto, eXRAMHardware, eXRAMAccessible;
#endif //_FRAMEWORK_H_