FS2_Open
Open source remastering of the Freespace 2 engine
openal.h File Reference
#include <AL/al.h>
#include <AL/alc.h>
#include <string>

Go to the source code of this file.

Macros

#define OpenAL_ErrorCheck(x, y)
 
#define OpenAL_ErrorPrint(x)
 
#define OpenAL_C_ErrorCheck(x, y)
 
#define OpenAL_C_ErrorPrint(x)
 
#define AL_BYTE_LOKI   0x100C
 
#define AL_BYTE_OFFSET   0x1026
 
#define ALC_EXT_EFX   1
 
#define AL_FILTER_TYPE   0x8001
 
#define AL_EFFECT_TYPE   0x8001
 
#define AL_FILTER_NULL   0x0000
 
#define AL_FILTER_LOWPASS   0x0001
 
#define AL_EFFECT_NULL   0x0000
 
#define AL_EFFECT_EAXREVERB   0x8000
 
#define AL_EFFECT_REVERB   0x0001
 
#define AL_EFFECT_ECHO   0x0004
 
#define ALC_EFX_MAJOR_VERSION   0x20001
 
#define ALC_EFX_MINOR_VERSION   0x20002
 
#define ALC_MAX_AUXILIARY_SENDS   0x20003
 
#define AL_AUXILIARY_SEND_FILTER   0x20006
 
#define AL_EAXREVERB_DENSITY   0x0001
 
#define AL_EAXREVERB_DIFFUSION   0x0002
 
#define AL_EAXREVERB_GAIN   0x0003
 
#define AL_EAXREVERB_GAINHF   0x0004
 
#define AL_EAXREVERB_GAINLF   0x0005
 
#define AL_EAXREVERB_DECAY_TIME   0x0006
 
#define AL_EAXREVERB_DECAY_HFRATIO   0x0007
 
#define AL_EAXREVERB_DECAY_LFRATIO   0x0008
 
#define AL_EAXREVERB_REFLECTIONS_GAIN   0x0009
 
#define AL_EAXREVERB_REFLECTIONS_DELAY   0x000A
 
#define AL_EAXREVERB_REFLECTIONS_PAN   0x000B
 
#define AL_EAXREVERB_LATE_REVERB_GAIN   0x000C
 
#define AL_EAXREVERB_LATE_REVERB_DELAY   0x000D
 
#define AL_EAXREVERB_LATE_REVERB_PAN   0x000E
 
#define AL_EAXREVERB_ECHO_TIME   0x000F
 
#define AL_EAXREVERB_ECHO_DEPTH   0x0010
 
#define AL_EAXREVERB_MODULATION_TIME   0x0011
 
#define AL_EAXREVERB_MODULATION_DEPTH   0x0012
 
#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF   0x0013
 
#define AL_EAXREVERB_HFREFERENCE   0x0014
 
#define AL_EAXREVERB_LFREFERENCE   0x0015
 
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR   0x0016
 
#define AL_EAXREVERB_DECAY_HFLIMIT   0x0017
 
#define AL_EFFECTSLOT_NULL   0x0000
 
#define AL_EFFECTSLOT_EFFECT   0x0001
 
#define AL_EXT_float32   1
 
#define AL_FORMAT_MONO_FLOAT32   0x10010
 
#define AL_FORMAT_STEREO_FLOAT32   0x10011
 

Functions

const char * openal_error_string (int get_alc=0)
 
bool openal_init_device (SCP_string *playback, SCP_string *capture)
 
ALenum openal_get_format (ALint bits, ALint n_channels)
 

Macro Definition Documentation

#define AL_AUXILIARY_SEND_FILTER   0x20006

Definition at line 86 of file openal.h.

#define AL_BYTE_LOKI   0x100C

Definition at line 64 of file openal.h.

#define AL_BYTE_OFFSET   0x1026

Definition at line 69 of file openal.h.

#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF   0x0013

Definition at line 106 of file openal.h.

#define AL_EAXREVERB_DECAY_HFLIMIT   0x0017

Definition at line 110 of file openal.h.

#define AL_EAXREVERB_DECAY_HFRATIO   0x0007

Definition at line 94 of file openal.h.

#define AL_EAXREVERB_DECAY_LFRATIO   0x0008

Definition at line 95 of file openal.h.

#define AL_EAXREVERB_DECAY_TIME   0x0006

Definition at line 93 of file openal.h.

#define AL_EAXREVERB_DENSITY   0x0001

Definition at line 88 of file openal.h.

#define AL_EAXREVERB_DIFFUSION   0x0002

Definition at line 89 of file openal.h.

#define AL_EAXREVERB_ECHO_DEPTH   0x0010

Definition at line 103 of file openal.h.

#define AL_EAXREVERB_ECHO_TIME   0x000F

Definition at line 102 of file openal.h.

#define AL_EAXREVERB_GAIN   0x0003

Definition at line 90 of file openal.h.

#define AL_EAXREVERB_GAINHF   0x0004

Definition at line 91 of file openal.h.

#define AL_EAXREVERB_GAINLF   0x0005

Definition at line 92 of file openal.h.

#define AL_EAXREVERB_HFREFERENCE   0x0014

Definition at line 107 of file openal.h.

#define AL_EAXREVERB_LATE_REVERB_DELAY   0x000D

Definition at line 100 of file openal.h.

#define AL_EAXREVERB_LATE_REVERB_GAIN   0x000C

Definition at line 99 of file openal.h.

#define AL_EAXREVERB_LATE_REVERB_PAN   0x000E

Definition at line 101 of file openal.h.

#define AL_EAXREVERB_LFREFERENCE   0x0015

Definition at line 108 of file openal.h.

#define AL_EAXREVERB_MODULATION_DEPTH   0x0012

Definition at line 105 of file openal.h.

#define AL_EAXREVERB_MODULATION_TIME   0x0011

Definition at line 104 of file openal.h.

#define AL_EAXREVERB_REFLECTIONS_DELAY   0x000A

Definition at line 97 of file openal.h.

#define AL_EAXREVERB_REFLECTIONS_GAIN   0x0009

Definition at line 96 of file openal.h.

#define AL_EAXREVERB_REFLECTIONS_PAN   0x000B

Definition at line 98 of file openal.h.

#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR   0x0016

Definition at line 109 of file openal.h.

#define AL_EFFECT_EAXREVERB   0x8000

Definition at line 79 of file openal.h.

#define AL_EFFECT_ECHO   0x0004

Definition at line 81 of file openal.h.

#define AL_EFFECT_NULL   0x0000

Definition at line 78 of file openal.h.

#define AL_EFFECT_REVERB   0x0001

Definition at line 80 of file openal.h.

#define AL_EFFECT_TYPE   0x8001

Definition at line 75 of file openal.h.

#define AL_EFFECTSLOT_EFFECT   0x0001

Definition at line 113 of file openal.h.

#define AL_EFFECTSLOT_NULL   0x0000

Definition at line 112 of file openal.h.

#define AL_EXT_float32   1

Definition at line 117 of file openal.h.

#define AL_FILTER_LOWPASS   0x0001

Definition at line 77 of file openal.h.

#define AL_FILTER_NULL   0x0000

Definition at line 76 of file openal.h.

#define AL_FILTER_TYPE   0x8001

Definition at line 74 of file openal.h.

#define AL_FORMAT_MONO_FLOAT32   0x10010

Definition at line 118 of file openal.h.

#define AL_FORMAT_STEREO_FLOAT32   0x10011

Definition at line 119 of file openal.h.

#define ALC_EFX_MAJOR_VERSION   0x20001

Definition at line 82 of file openal.h.

#define ALC_EFX_MINOR_VERSION   0x20002

Definition at line 83 of file openal.h.

#define ALC_EXT_EFX   1

Definition at line 73 of file openal.h.

#define ALC_MAX_AUXILIARY_SENDS   0x20003

Definition at line 84 of file openal.h.

#define OpenAL_C_ErrorCheck (   x,
  y 
)
Value:
do { \
x; \
const char *error_text = openal_error_string(1); \
if ( error_text != NULL ) { \
nprintf(("Warning", "SOUND: %s:%d - OpenAL error = '%s'\n", __FILE__, __LINE__, error_text)); \
y; \
} \
} while (0);
#define nprintf(args)
Definition: pstypes.h:239
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
const char * openal_error_string(int get_alc=0)
Definition: openal.cpp:56
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581
GLint y
Definition: Gl.h:1505

Definition at line 43 of file openal.h.

#define OpenAL_C_ErrorPrint (   x)
Value:
do { \
x; \
const char *error_text = openal_error_string(1); \
if ( error_text != NULL ) { \
nprintf(("Sound", "OpenAL ERROR: \"%s\" in %s, line %i\n", error_text, __FILE__, __LINE__)); \
} \
} while (0);
#define nprintf(args)
Definition: pstypes.h:239
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
const char * openal_error_string(int get_alc=0)
Definition: openal.cpp:56
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581

Definition at line 53 of file openal.h.

#define OpenAL_ErrorCheck (   x,
  y 
)
Value:
do { \
x; \
const char *error_text = openal_error_string(0); \
if ( error_text != NULL ) { \
nprintf(("Warning", "SOUND: %s:%d - OpenAL error = '%s'\n", __FILE__, __LINE__, error_text)); \
y; \
} \
} while (0);
#define nprintf(args)
Definition: pstypes.h:239
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
const char * openal_error_string(int get_alc=0)
Definition: openal.cpp:56
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581
GLint y
Definition: Gl.h:1505

Definition at line 24 of file openal.h.

#define OpenAL_ErrorPrint (   x)
Value:
do { \
x; \
const char *error_text = openal_error_string(0); \
if ( error_text != NULL ) { \
nprintf(("Sound", "OpenAL ERROR: \"%s\" in %s, line %i\n", error_text, __FILE__, __LINE__)); \
} \
} while (0);
#define nprintf(args)
Definition: pstypes.h:239
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
const char * openal_error_string(int get_alc=0)
Definition: openal.cpp:56
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581

Definition at line 34 of file openal.h.

Function Documentation

const char* openal_error_string ( int  get_alc = 0)

Definition at line 56 of file openal.cpp.

ALenum openal_get_format ( ALint  bits,
ALint  n_channels 
)

Definition at line 78 of file openal.cpp.

bool openal_init_device ( SCP_string playback,
SCP_string capture 
)

Definition at line 323 of file openal.cpp.