hello world

This commit is contained in:
Timothee 'TTimo' Besset
2011-11-22 15:28:15 -06:00
commit fb1609f554
2155 changed files with 1017022 additions and 0 deletions

491
neo/openal/include/al.h Normal file
View File

@@ -0,0 +1,491 @@
#ifndef _AL_H_
#define _AL_H_
/**
* OpenAL cross platform audio library
* Copyright (C) 1999-2000 by authors.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* Or go to http://www.gnu.org/copyleft/lgpl.html
*/
#include "altypes.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#ifdef _OPENAL32LIB
#define ALAPI __declspec(dllexport)
#else
#define ALAPI __declspec(dllimport)
#endif
#define ALAPIENTRY __cdecl
#define AL_CALLBACK
#else
#ifdef TARGET_OS_MAC
#if TARGET_OS_MAC
#pragma export on
#endif
#endif
#define ALAPI
#define ALAPIENTRY __cdecl
#define AL_CALLBACK
#endif
#define OPENAL
#ifndef AL_NO_PROTOTYPES
/**
* OpenAL Maintenance Functions
* Initialization and exiting.
* State Management and Query.
* Error Handling.
* Extension Support.
*/
/** State management. */
ALAPI ALvoid ALAPIENTRY alEnable( ALenum capability );
ALAPI ALvoid ALAPIENTRY alDisable( ALenum capability );
ALAPI ALboolean ALAPIENTRY alIsEnabled( ALenum capability );
/** Application preferences for driver performance choices. */
ALAPI ALvoid ALAPIENTRY alHint( ALenum target, ALenum mode );
/** State retrieval. */
ALAPI ALboolean ALAPIENTRY alGetBoolean( ALenum param );
ALAPI ALint ALAPIENTRY alGetInteger( ALenum param );
ALAPI ALfloat ALAPIENTRY alGetFloat( ALenum param );
ALAPI ALdouble ALAPIENTRY alGetDouble( ALenum param );
ALAPI ALvoid ALAPIENTRY alGetBooleanv( ALenum param, ALboolean* data );
ALAPI ALvoid ALAPIENTRY alGetIntegerv( ALenum param, ALint* data );
ALAPI ALvoid ALAPIENTRY alGetFloatv( ALenum param, ALfloat* data );
ALAPI ALvoid ALAPIENTRY alGetDoublev( ALenum param, ALdouble* data );
ALAPI ALubyte* ALAPIENTRY alGetString( ALenum param );
/**
* Error support.
* Obtain the most recent error generated in the AL state machine.
*/
ALAPI ALenum ALAPIENTRY alGetError( ALvoid );
/**
* Extension support.
* Obtain the address of a function (usually an extension)
* with the name fname. All addresses are context-independent.
*/
ALAPI ALboolean ALAPIENTRY alIsExtensionPresent( ALubyte* fname );
/**
* Extension support.
* Obtain the address of a function (usually an extension)
* with the name fname. All addresses are context-independent.
*/
ALAPI ALvoid* ALAPIENTRY alGetProcAddress( ALubyte* fname );
/**
* Extension support.
* Obtain the integer value of an enumeration (usually an extension) with the name ename.
*/
ALAPI ALenum ALAPIENTRY alGetEnumValue( ALubyte* ename );
/**
* LISTENER
* Listener is the sample position for a given context.
* The multi-channel (usually stereo) output stream generated
* by the mixer is parametrized by this Listener object:
* its position and velocity relative to Sources, within
* occluder and reflector geometry.
*/
/**
*
* Listener Environment: default 0.
*/
ALAPI ALvoid ALAPIENTRY alListeneri( ALenum param, ALint value );
/**
*
* Listener Gain: default 1.0f.
*/
ALAPI ALvoid ALAPIENTRY alListenerf( ALenum param, ALfloat value );
/**
*
* Listener Position.
* Listener Velocity.
*/
ALAPI ALvoid ALAPIENTRY alListener3f( ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
/**
*
* Listener Position: ALfloat[3]
* Listener Velocity: ALfloat[3]
* Listener Orientation: ALfloat[6] (forward and up vector).
*/
ALAPI ALvoid ALAPIENTRY alListenerfv( ALenum param, ALfloat* values );
ALAPI ALvoid ALAPIENTRY alGetListeneri( ALenum param, ALint* value );
ALAPI ALvoid ALAPIENTRY alGetListenerf( ALenum param, ALfloat* value );
ALAPI ALvoid ALAPIENTRY alGetListener3f( ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 );
ALAPI ALvoid ALAPIENTRY alGetListenerfv( ALenum param, ALfloat* values );
/**
* SOURCE
* Source objects are by default localized. Sources
* take the PCM data provided in the specified Buffer,
* apply Source-specific modifications, and then
* submit them to be mixed according to spatial
* arrangement etc.
*/
/** Create Source objects. */
ALAPI ALvoid ALAPIENTRY alGenSources( ALsizei n, ALuint* sources );
/** Delete Source objects. */
ALAPI ALvoid ALAPIENTRY alDeleteSources( ALsizei n, ALuint* sources );
/** Verify a handle is a valid Source. */
ALAPI ALboolean ALAPIENTRY alIsSource( ALuint id );
/** Set an integer parameter for a Source object. */
ALAPI ALvoid ALAPIENTRY alSourcei( ALuint source, ALenum param, ALint value );
ALAPI ALvoid ALAPIENTRY alSourcef( ALuint source, ALenum param, ALfloat value );
ALAPI ALvoid ALAPIENTRY alSource3f( ALuint source, ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
ALAPI ALvoid ALAPIENTRY alSourcefv( ALuint source, ALenum param, ALfloat* values );
/** Get an integer parameter for a Source object. */
ALAPI ALvoid ALAPIENTRY alGetSourcei( ALuint source, ALenum param, ALint* value );
ALAPI ALvoid ALAPIENTRY alGetSourcef( ALuint source, ALenum param, ALfloat* value );
ALAPI ALvoid ALAPIENTRY alGetSource3f( ALuint source, ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 );
ALAPI ALvoid ALAPIENTRY alGetSourcefv( ALuint source, ALenum param, ALfloat* values );
ALAPI ALvoid ALAPIENTRY alSourcePlayv( ALsizei n, ALuint *sources );
ALAPI ALvoid ALAPIENTRY alSourcePausev( ALsizei n, ALuint *sources );
ALAPI ALvoid ALAPIENTRY alSourceStopv( ALsizei n, ALuint *sources );
ALAPI ALvoid ALAPIENTRY alSourceRewindv(ALsizei n,ALuint *sources);
/** Activate a source, start replay. */
ALAPI ALvoid ALAPIENTRY alSourcePlay( ALuint source );
/**
* Pause a source,
* temporarily remove it from the mixer list.
*/
ALAPI ALvoid ALAPIENTRY alSourcePause( ALuint source );
/**
* Stop a source,
* temporarily remove it from the mixer list,
* and reset its internal state to pre-Play.
* To remove a Source completely, it has to be
* deleted following Stop, or before Play.
*/
ALAPI ALvoid ALAPIENTRY alSourceStop( ALuint source );
/**
* Rewinds a source,
* temporarily remove it from the mixer list,
* and reset its internal state to pre-Play.
*/
ALAPI ALvoid ALAPIENTRY alSourceRewind( ALuint source );
/**
* BUFFER
* Buffer objects are storage space for sample data.
* Buffers are referred to by Sources. There can be more than
* one Source using the same Buffer data. If Buffers have
* to be duplicated on a per-Source basis, the driver has to
* take care of allocation, copying, and deallocation as well
* as propagating buffer data changes.
*/
/** Buffer object generation. */
ALAPI ALvoid ALAPIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
ALAPI ALvoid ALAPIENTRY alDeleteBuffers( ALsizei n, ALuint* buffers );
ALAPI ALboolean ALAPIENTRY alIsBuffer( ALuint buffer );
/**
* Specify the data to be filled into a buffer.
*/
ALAPI ALvoid ALAPIENTRY alBufferData( ALuint buffer,
ALenum format,
ALvoid* data,
ALsizei size,
ALsizei freq );
ALAPI ALvoid ALAPIENTRY alGetBufferi( ALuint buffer, ALenum param, ALint* value );
ALAPI ALvoid ALAPIENTRY alGetBufferf( ALuint buffer, ALenum param, ALfloat* value );
/**
* Queue stuff
*/
ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, ALuint* buffers );
ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint* buffers );
/**
* Knobs and dials
*/
ALAPI ALvoid ALAPIENTRY alDistanceModel( ALenum value );
ALAPI ALvoid ALAPIENTRY alDopplerFactor( ALfloat value );
ALAPI ALvoid ALAPIENTRY alDopplerVelocity( ALfloat value );
#else /* AL_NO_PROTOTYPES */
/**
* OpenAL Maintenance Functions
* Initialization and exiting.
* State Management and Query.
* Error Handling.
* Extension Support.
*/
/** State management. */
ALAPI ALvoid ALAPIENTRY (*alEnable)( ALenum capability );
ALAPI ALvoid ALAPIENTRY (*alDisable)( ALenum capability );
ALAPI ALboolean ALAPIENTRY (*alIsEnabled)( ALenum capability );
/** Application preferences for driver performance choices. */
ALAPI ALvoid ALAPIENTRY (*alHint)( ALenum target, ALenum mode );
/** State retrieval. */
ALAPI ALboolean ALAPIENTRY (*alGetBoolean)( ALenum param );
ALAPI ALint ALAPIENTRY (*alGetInteger)( ALenum param );
ALAPI ALfloat ALAPIENTRY (*alGetFloat)( ALenum param );
ALAPI ALdouble ALAPIENTRY (*alGetDouble)( ALenum param );
ALAPI ALvoid ALAPIENTRY (*alGetBooleanv)( ALenum param, ALboolean* data );
ALAPI ALvoid ALAPIENTRY (*alGetIntegerv)( ALenum param, ALint* data );
ALAPI ALvoid ALAPIENTRY (*alGetFloatv)( ALenum param, ALfloat* data );
ALAPI ALvoid ALAPIENTRY (*alGetDoublev)( ALenum param, ALdouble* data );
ALAPI ALubyte* ALAPIENTRY (*alGetString)( ALenum param );
/**
* Error support.
* Obtain the most recent error generated in the AL state machine.
*/
ALAPI ALenum ALAPIENTRY (*alGetError)( ALvoid );
/**
* Extension support.
* Obtain the address of a function (usually an extension)
* with the name fname. All addresses are context-independent.
*/
ALAPI ALboolean ALAPIENTRY (*alIsExtensionPresent)( ALubyte* fname );
/**
* Extension support.
* Obtain the address of a function (usually an extension)
* with the name fname. All addresses are context-independent.
*/
ALAPI ALvoid* ALAPIENTRY (*alGetProcAddress)( ALubyte* fname );
/**
* Extension support.
* Obtain the integer value of an enumeration (usually an extension) with the name ename.
*/
ALAPI ALenum ALAPIENTRY (*alGetEnumValue)( ALubyte* ename );
/**
* LISTENER
* Listener is the sample position for a given context.
* The multi-channel (usually stereo) output stream generated
* by the mixer is parametrized by this Listener object:
* its position and velocity relative to Sources, within
* occluder and reflector geometry.
*/
/**
*
* Listener Environment: default 0.
*/
ALAPI ALvoid ALAPIENTRY (*alListeneri)( ALenum param, ALint value );
/**
*
* Listener Gain: default 1.0f.
*/
ALAPI ALvoid ALAPIENTRY (*alListenerf)( ALenum param, ALfloat value );
/**
*
* Listener Position.
* Listener Velocity.
*/
ALAPI ALvoid ALAPIENTRY (*alListener3f)( ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
/**
*
* Listener Position: ALfloat[3]
* Listener Velocity: ALfloat[3]
* Listener Orientation: ALfloat[6] (forward and up vector).
*/
ALAPI ALvoid ALAPIENTRY (*alListenerfv)( ALenum param, ALfloat* values );
ALAPI ALvoid ALAPIENTRY (*alGetListeneri)( ALenum param, ALint* value );
ALAPI ALvoid ALAPIENTRY (*alGetListenerf)( ALenum param, ALfloat* value );
ALAPI ALvoid ALAPIENTRY (*alGetListener3f)( ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 );
ALAPI ALvoid ALAPIENTRY (*alGetListenerfv)( ALenum param, ALfloat* values );
/**
* SOURCE
* Source objects are by default localized. Sources
* take the PCM data provided in the specified Buffer,
* apply Source-specific modifications, and then
* submit them to be mixed according to spatial
* arrangement etc.
*/
/** Create Source objects. */
ALAPI ALvoid ALAPIENTRY (*alGenSources)( ALsizei n, ALuint* sources );
/** Delete Source objects. */
ALAPI ALvoid ALAPIENTRY (*alDeleteSources)( ALsizei n, ALuint* sources );
/** Verify a handle is a valid Source. */
ALAPI ALboolean ALAPIENTRY (*alIsSource)( ALuint id );
/** Set an integer parameter for a Source object. */
ALAPI ALvoid ALAPIENTRY (*alSourcei)( ALuint source, ALenum param, ALint value );
ALAPI ALvoid ALAPIENTRY (*alSourcef)( ALuint source, ALenum param, ALfloat value );
ALAPI ALvoid ALAPIENTRY (*alSource3f)( ALuint source, ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
ALAPI ALvoid ALAPIENTRY (*alSourcefv)( ALuint source, ALenum param, ALfloat* values );
/** Get an integer parameter for a Source object. */
ALAPI ALvoid ALAPIENTRY (*alGetSourcei)( ALuint source, ALenum param, ALint* value );
ALAPI ALvoid ALAPIENTRY (*alGetSourcef)( ALuint source, ALenum param, ALfloat* value );
ALAPI ALvoid ALAPIENTRY (*alGetSourcefv)( ALuint source, ALenum param, ALfloat* values );
ALAPI ALvoid ALAPIENTRY (*alSourcePlayv)( ALsizei n, ALuint *sources );
ALAPI ALvoid ALAPIENTRY (*alSourceStopv)( ALsizei n, ALuint *sources );
/** Activate a source, start replay. */
ALAPI ALvoid ALAPIENTRY (*alSourcePlay)( ALuint source );
/**
* Pause a source,
* temporarily remove it from the mixer list.
*/
ALAPI ALvoid ALAPIENTRY (*alSourcePause)( ALuint source );
/**
* Stop a source,
* temporarily remove it from the mixer list,
* and reset its internal state to pre-Play.
* To remove a Source completely, it has to be
* deleted following Stop, or before Play.
*/
ALAPI ALvoid ALAPIENTRY (*alSourceStop)( ALuint source );
/**
* BUFFER
* Buffer objects are storage space for sample data.
* Buffers are referred to by Sources. There can be more than
* one Source using the same Buffer data. If Buffers have
* to be duplicated on a per-Source basis, the driver has to
* take care of allocation, copying, and deallocation as well
* as propagating buffer data changes.
*/
/** Buffer object generation. */
ALAPI ALvoid ALAPIENTRY (*alGenBuffers)( ALsizei n, ALuint* buffers );
ALAPI ALvoid ALAPIENTRY (*alDeleteBuffers)( ALsizei n, ALuint* buffers );
ALAPI ALboolean ALAPIENTRY (*alIsBuffer)( ALuint buffer );
/**
* Specify the data to be filled into a buffer.
*/
ALAPI ALvoid ALAPIENTRY (*alBufferData)( ALuint buffer,
ALenum format,
ALvoid* data,
ALsizei size,
ALsizei freq );
ALAPI ALvoid ALAPIENTRY (*alGetBufferi)( ALuint buffer, ALenum param, ALint* value );
ALAPI ALvoid ALAPIENTRY (*alGetBufferf)( ALuint buffer, ALenum param, ALfloat* value );
/**
* Queue stuff
*/
ALAPI ALvoid ALAPIENTRY (*alSourceQueueBuffers)( ALuint source, ALsizei n, ALuint* buffers );
ALAPI ALvoid ALAPIENTRY (*alSourceUnqueueBuffers)( ALuint source, ALsizei n, ALuint* buffers );
/**
* Knobs and dials
*/
ALAPI ALvoid ALAPIENTRY (*alDistanceModel)( ALenum value );
ALAPI ALvoid ALAPIENTRY (*alDopplerFactor)( ALfloat value );
ALAPI ALvoid ALAPIENTRY (*alDopplerVelocity)( ALfloat value );
#endif /* AL_NO_PROTOTYPES */
#ifdef TARGET_OS_MAC
#if TARGET_OS_MAC
#pragma export off
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif

91
neo/openal/include/alc.h Normal file
View File

@@ -0,0 +1,91 @@
#ifndef _ALC_H_
#define _ALC_H_
#include "altypes.h"
#include "alctypes.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#ifdef _OPENAL32LIB
#define ALCAPI __declspec(dllexport)
#else
#define ALCAPI __declspec(dllimport)
#endif
typedef struct ALCdevice_struct ALCdevice;
typedef struct ALCcontext_struct ALCcontext;
#define ALCAPIENTRY __cdecl
#else
#ifdef TARGET_OS_MAC
#if TARGET_OS_MAC
#pragma export on
#endif
#endif
#define ALCAPI
#define ALCAPIENTRY __cdecl
#endif
#ifndef ALC_NO_PROTOTYPES
ALCAPI ALCubyte* ALCAPIENTRY alcGetString(ALCdevice *device,ALCenum param);
ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data);
ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(ALCubyte *deviceName);
ALCAPI ALCvoid ALCAPIENTRY alcCloseDevice(ALCdevice *device);
ALCAPI ALCcontext*ALCAPIENTRY alcCreateContext(ALCdevice *device,ALCint *attrList);
ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *context);
ALCAPI ALCvoid ALCAPIENTRY alcProcessContext(ALCcontext *context);
ALCAPI ALCcontext*ALCAPIENTRY alcGetCurrentContext(ALCvoid);
ALCAPI ALCdevice* ALCAPIENTRY alcGetContextsDevice(ALCcontext *context);
ALCAPI ALCvoid ALCAPIENTRY alcSuspendContext(ALCcontext *context);
ALCAPI ALCvoid ALCAPIENTRY alcDestroyContext(ALCcontext *context);
ALCAPI ALCenum ALCAPIENTRY alcGetError(ALCdevice *device);
ALCAPI ALCboolean ALCAPIENTRY alcIsExtensionPresent(ALCdevice *device,ALCubyte *extName);
ALCAPI ALCvoid * ALCAPIENTRY alcGetProcAddress(ALCdevice *device,ALCubyte *funcName);
ALCAPI ALCenum ALCAPIENTRY alcGetEnumValue(ALCdevice *device,ALCubyte *enumName);
#else /* ALC_NO_PROTOTYPES */
ALCAPI ALCubyte* ALCAPIENTRY (*alcGetString)(ALCdevice *device,ALCenum param);
ALCAPI ALCvoid ALCAPIENTRY (*alcGetIntegerv)(ALCdevice * device,ALCenum param,ALCsizei size,ALCint *data);
ALCAPI ALCdevice* ALCAPIENTRY (*alcOpenDevice)(ALubyte *deviceName);
ALCAPI ALCvoid ALCAPIENTRY (*alcCloseDevice)(ALCdevice *device);
ALCAPI ALCcontext*ALCAPIENTRY (*alcCreateContext)(ALCdevice *device,ALCint *attrList);
ALCAPI ALCboolean ALCAPIENTRY (*alcMakeContextCurrent)(ALCcontext *context);
ALCAPI ALCvoid ALCAPIENTRY (*alcProcessContext)(ALCcontext *context);
ALCAPI ALCcontext*ALCAPIENTRY (*alcGetCurrentContext)(ALCvoid);
ALCAPI ALCdevice* ALCAPIENTRY (*alcGetContextsDevice)(ALCcontext *context);
ALCAPI ALCvoid ALCAPIENTRY (*alcSuspendContext)(ALCcontext *context);
ALCAPI ALCvoid ALCAPIENTRY (*alcDestroyContext)(ALCcontext *context);
ALCAPI ALCenum ALCAPIENTRY (*alcGetError)(ALCdevice *device);
ALCAPI ALCboolean ALCAPIENTRY (*alcIsExtensionPresent)(ALCdevice *device,ALCubyte *extName);
ALCAPI ALCvoid * ALCAPIENTRY (*alcGetProcAddress)(ALCdevice *device,ALCubyte *funcName);
ALCAPI ALCenum ALCAPIENTRY (*alcGetEnumValue)(ALCdevice *device,ALCubyte *enumName);
#endif /* AL_NO_PROTOTYPES */
#ifdef TARGET_OS_MAC
#if TARGET_OS_MAC
#pragma export off
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,125 @@
#ifndef _ALCTYPES_H_
#define _ALCTYPES_H_
/**
* OpenAL cross platform audio library
* Copyright (C) 1999-2000 by authors.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* Or go to http://www.gnu.org/copyleft/lgpl.html
*/
#ifdef __cplusplus
extern "C" {
#endif
/** ALC boolean type. */
typedef char ALCboolean;
/** ALC 8bit signed byte. */
typedef char ALCbyte;
/** ALC 8bit unsigned byte. */
typedef unsigned char ALCubyte;
/** ALC 16bit signed short integer type. */
typedef short ALCshort;
/** ALC 16bit unsigned short integer type. */
typedef unsigned short ALCushort;
/** ALC 32bit unsigned integer type. */
typedef unsigned ALCuint;
/** ALC 32bit signed integer type. */
typedef int ALCint;
/** ALC 32bit floating point type. */
typedef float ALCfloat;
/** ALC 64bit double point type. */
typedef double ALCdouble;
/** ALC 32bit type. */
typedef unsigned int ALCsizei;
/** ALC void type */
typedef void ALCvoid;
/** ALC enumerations. */
typedef int ALCenum;
/* Bad value. */
#define ALC_INVALID (-1)
/* Boolean False. */
#define ALC_FALSE 0
/* Boolean True. */
#define ALC_TRUE 1
/** Errors: No Error. */
#define ALC_NO_ERROR ALC_FALSE
#define ALC_MAJOR_VERSION 0x1000
#define ALC_MINOR_VERSION 0x1001
#define ALC_ATTRIBUTES_SIZE 0x1002
#define ALC_ALL_ATTRIBUTES 0x1003
#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
#define ALC_DEVICE_SPECIFIER 0x1005
#define ALC_EXTENSIONS 0x1006
#define ALC_FREQUENCY 0x1007
#define ALC_REFRESH 0x1008
#define ALC_SYNC 0x1009
/**
* The device argument does not name a valid dvice.
*/
#define ALC_INVALID_DEVICE 0xA001
/**
* The context argument does not name a valid context.
*/
#define ALC_INVALID_CONTEXT 0xA002
/**
* A function was called at inappropriate time,
* or in an inappropriate way, causing an illegal state.
* This can be an incompatible ALenum, object ID,
* and/or function.
*/
#define ALC_INVALID_ENUM 0xA003
/**
* Illegal value passed as an argument to an AL call.
* Applies to parameter values, but not to enumerations.
*/
#define ALC_INVALID_VALUE 0xA004
/**
* A function could not be completed,
* because there is not enough memory available.
*/
#define ALC_OUT_OF_MEMORY 0xA005
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,333 @@
#ifndef _ALTYPES_H_
#define _ALTYPES_H_
/**
* OpenAL cross platform audio library
* Copyright (C) 1999-2000 by authors.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* Or go to http://www.gnu.org/copyleft/lgpl.html
*/
#ifdef __cplusplus
extern "C" {
#endif
/** OpenAL boolean type. */
typedef char ALboolean;
/** OpenAL 8bit signed byte. */
typedef char ALbyte;
/** OpenAL 8bit unsigned byte. */
typedef unsigned char ALubyte;
/** OpenAL 16bit signed short integer type. */
typedef short ALshort;
/** OpenAL 16bit unsigned short integer type. */
typedef unsigned short ALushort;
/** OpenAL 32bit unsigned integer type. */
typedef unsigned ALuint;
/** OpenAL 32bit signed integer type. */
typedef int ALint;
/** OpenAL 32bit floating point type. */
typedef float ALfloat;
/** OpenAL 64bit double point type. */
typedef double ALdouble;
/** OpenAL 32bit type. */
typedef unsigned int ALsizei;
/** OpenAL void type */
typedef void ALvoid;
/** OpenAL enumerations. */
typedef int ALenum;
/* Bad value. */
#define AL_INVALID (-1)
/* Disable value. */
#define AL_NONE 0
/* Boolean False. */
#define AL_FALSE 0
/* Boolean True. */
#define AL_TRUE 1
/**
* Indicate the type of AL_SOURCE.
* Sources can be spatialized
*/
#define AL_SOURCE_TYPE 0x200
/** Indicate source has absolute coordinates. */
#define AL_SOURCE_ABSOLUTE 0x201
/** Indicate Source has listener relative coordinates. */
#define AL_SOURCE_RELATIVE 0x202
/**
* Directional source, inner cone angle, in degrees.
* Range: [0-360]
* Default: 360
*/
#define AL_CONE_INNER_ANGLE 0x1001
/**
* Directional source, outer cone angle, in degrees.
* Range: [0-360]
* Default: 360
*/
#define AL_CONE_OUTER_ANGLE 0x1002
/**
* Specify the pitch to be applied, either at source,
* or on mixer results, at listener.
* Range: [0.5-2.0]
* Default: 1.0
*/
#define AL_PITCH 0x1003
/**
* Specify the current location in three dimensional space.
* OpenAL, like OpenGL, uses a right handed coordinate system,
* where in a frontal default view X (thumb) points right,
* Y points up (index finger), and Z points towards the
* viewer/camera (middle finger).
* To switch from a left handed coordinate system, flip the
* sign on the Z coordinate.
* Listener position is always in the world coordinate system.
*/
#define AL_POSITION 0x1004
/** Specify the current direction as forward vector. */
#define AL_DIRECTION 0x1005
/** Specify the current velocity in three dimensional space. */
#define AL_VELOCITY 0x1006
/**
* Indicate whether source has to loop infinite.
* Type: ALboolean
* Range: [AL_TRUE, AL_FALSE]
* Default: AL_FALSE
*/
#define AL_LOOPING 0x1007
/**
* Indicate the buffer to provide sound samples.
* Type: ALuint.
* Range: any valid Buffer id.
*/
#define AL_BUFFER 0x1009
/**
* Indicate the gain (volume amplification) applied.
* Type: ALfloat.
* Range: ]0.0- ]
* A value of 1.0 means un-attenuated/unchanged.
* Each division by 2 equals an attenuation of -6dB.
* Each multiplicaton with 2 equals an amplification of +6dB.
* A value of 0.0 is meaningless with respect to a logarithmic
* scale; it is interpreted as zero volume - the channel
* is effectively disabled.
*/
#define AL_GAIN 0x100A
/**
* Indicate minimum source attenuation.
* Type: ALfloat
* Range: [0.0 - 1.0]
*/
#define AL_MIN_GAIN 0x100D
/**
* Indicate maximum source attenuation.
* Type: ALfloat
* Range: [0.0 - 1.0]
*/
#define AL_MAX_GAIN 0x100E
/**
* Specify the current orientation.
* Type: ALfv6 (at/up)
* Range: N/A
*/
#define AL_ORIENTATION 0x100F
/* byte offset into source (in canon format). -1 if source
* is not playing. Don't set this, get this.
*
* Type: ALfloat
* Range: [0.0 - ]
* Default: 1.0
*/
#define AL_REFERENCE_DISTANCE 0x1020
/**
* Indicate the rolloff factor for the source.
* Type: ALfloat
* Range: [0.0 - ]
* Default: 1.0
*/
#define AL_ROLLOFF_FACTOR 0x1021
/**
* Indicate the gain (volume amplification) applied.
* Type: ALfloat.
* Range: ]0.0- ]
* A value of 1.0 means un-attenuated/unchanged.
* Each division by 2 equals an attenuation of -6dB.
* Each multiplicaton with 2 equals an amplification of +6dB.
* A value of 0.0 is meaningless with respect to a logarithmic
* scale; it is interpreted as zero volume - the channel
* is effectively disabled.
*/
#define AL_CONE_OUTER_GAIN 0x1022
/**
* Specify the maximum distance.
* Type: ALfloat
* Range: [0.0 - ]
*/
#define AL_MAX_DISTANCE 0x1023
/**
* Specify the channel mask. (Creative)
* Type: ALuint
* Range: [0 - 255]
*/
#define AL_CHANNEL_MASK 0x3000
/**
* Source state information
*/
#define AL_SOURCE_STATE 0x1010
#define AL_INITIAL 0x1011
#define AL_PLAYING 0x1012
#define AL_PAUSED 0x1013
#define AL_STOPPED 0x1014
/**
* Buffer Queue params
*/
#define AL_BUFFERS_QUEUED 0x1015
#define AL_BUFFERS_PROCESSED 0x1016
/** Sound buffers: format specifier. */
#define AL_FORMAT_MONO8 0x1100
#define AL_FORMAT_MONO16 0x1101
#define AL_FORMAT_STEREO8 0x1102
#define AL_FORMAT_STEREO16 0x1103
/**
* Sound buffers: frequency, in units of Hertz [Hz].
* This is the number of samples per second. Half of the
* sample frequency marks the maximum significant
* frequency component.
*/
#define AL_FREQUENCY 0x2001
#define AL_BITS 0x2002
#define AL_CHANNELS 0x2003
#define AL_SIZE 0x2004
#define AL_DATA 0x2005
/**
* Buffer state.
*
* Not supported for public use (yet).
*/
#define AL_UNUSED 0x2010
#define AL_PENDING 0x2011
#define AL_PROCESSED 0x2012
/** Errors: No Error. */
#define AL_NO_ERROR AL_FALSE
/**
* Illegal name passed as an argument to an AL call.
*/
#define AL_INVALID_NAME 0xA001
/**
* Illegal enum passed as an argument to an AL call.
*/
#define AL_INVALID_ENUM 0xA002
/**
* Illegal value passed as an argument to an AL call.
* Applies to parameter values, but not to enumerations.
*/
#define AL_INVALID_VALUE 0xA003
/**
* A function was called at inappropriate time,
* or in an inappropriate way, causing an illegal state.
* This can be an incompatible ALenum, object ID,
* and/or function.
*/
#define AL_INVALID_OPERATION 0xA004
/**
* A function could not be completed,
* because there is not enough memory available.
*/
#define AL_OUT_OF_MEMORY 0xA005
/** Context strings: Vendor Name. */
#define AL_VENDOR 0xB001
#define AL_VERSION 0xB002
#define AL_RENDERER 0xB003
#define AL_EXTENSIONS 0xB004
/** Global tweakage. */
/**
* Doppler scale. Default 1.0
*/
#define AL_DOPPLER_FACTOR 0xC000
/**
* Doppler velocity. Default 1.0
*/
#define AL_DOPPLER_VELOCITY 0xC001
/**
* Distance model. Default AL_INVERSE_DISTANCE_CLAMPED
*/
#define AL_DISTANCE_MODEL 0xD000
/** Distance models. */
#define AL_INVERSE_DISTANCE 0xD001
#define AL_INVERSE_DISTANCE_CLAMPED 0xD002
/**
* enables
*/
#ifdef __cplusplus
}
#endif
#endif

34
neo/openal/include/alu.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef _ALU_H_
#define _ALU_H_
#define ALUAPI
#define ALUAPIENTRY __cdecl
#define BUFFERSIZE 48000
#define FRACTIONBITS 14
#define FRACTIONMASK ((1L<<FRACTIONBITS)-1)
#define OUTPUTCHANNELS 2
#include "altypes.h"
#ifdef __cplusplus
extern "C" {
#endif
ALUAPI ALint ALUAPIENTRY aluF2L(ALfloat value);
ALUAPI ALshort ALUAPIENTRY aluF2S(ALfloat value);
ALUAPI ALvoid ALUAPIENTRY aluCrossproduct(ALfloat *inVector1,ALfloat *inVector2,ALfloat *outVector);
ALUAPI ALfloat ALUAPIENTRY aluDotproduct(ALfloat *inVector1,ALfloat *inVector2);
ALUAPI ALvoid ALUAPIENTRY aluNormalize(ALfloat *inVector);
ALUAPI ALvoid ALUAPIENTRY aluMatrixVector(ALfloat matrix[3][3],ALfloat *vector);
ALUAPI ALvoid ALUAPIENTRY aluCalculateSourceParameters(ALuint source,ALuint channels,ALfloat *drysend,ALfloat *wetsend,ALfloat *pitch);
ALUAPI ALvoid ALUAPIENTRY aluMixData(ALvoid *context,ALvoid *buffer,ALsizei size,ALenum format);
ALUAPI ALvoid ALUAPIENTRY aluSetReverb(ALvoid *Reverb,ALuint Environment);
ALUAPI ALvoid ALUAPIENTRY aluReverb(ALvoid *Reverb,ALfloat Buffer[][2],ALsizei BufferSize);
#ifdef __cplusplus
}
#endif
#endif

345
neo/openal/include/eax2.h Normal file
View File

@@ -0,0 +1,345 @@
/******************************************************************
*
* EAX.H - DirectSound3D Environmental Audio Extensions version 2.0
* Updated July 8, 1999
*
*******************************************************************
*/
#ifndef EAX20_H_INCLUDED
#define EAX20_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#pragma pack(push, 4)
/*
* EAX 2.0 listener property set {0306A6A8-B224-11d2-99E5-0000E8D8C722}
*/
DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties,
0x306a6a8,
0xb224,
0x11d2,
0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22);
typedef enum
{
DSPROPERTY_EAX20LISTENER_NONE,
DSPROPERTY_EAX20LISTENER_ALLPARAMETERS,
DSPROPERTY_EAX20LISTENER_ROOM,
DSPROPERTY_EAX20LISTENER_ROOMHF,
DSPROPERTY_EAX20LISTENER_ROOMROLLOFFFACTOR,
DSPROPERTY_EAX20LISTENER_DECAYTIME,
DSPROPERTY_EAX20LISTENER_DECAYHFRATIO,
DSPROPERTY_EAX20LISTENER_REFLECTIONS,
DSPROPERTY_EAX20LISTENER_REFLECTIONSDELAY,
DSPROPERTY_EAX20LISTENER_REVERB,
DSPROPERTY_EAX20LISTENER_REVERBDELAY,
DSPROPERTY_EAX20LISTENER_ENVIRONMENT,
DSPROPERTY_EAX20LISTENER_ENVIRONMENTSIZE,
DSPROPERTY_EAX20LISTENER_ENVIRONMENTDIFFUSION,
DSPROPERTY_EAX20LISTENER_AIRABSORPTIONHF,
DSPROPERTY_EAX20LISTENER_FLAGS
} DSPROPERTY_EAX20_LISTENERPROPERTY;
// OR these flags with property id
#define DSPROPERTY_EAX20LISTENER_IMMEDIATE 0x00000000 // changes take effect immediately
#define DSPROPERTY_EAX20LISTENER_DEFERRED 0x80000000 // changes take effect later
#define DSPROPERTY_EAX20LISTENER_COMMITDEFERREDSETTINGS (DSPROPERTY_EAX20LISTENER_NONE | \
DSPROPERTY_EAX20LISTENER_IMMEDIATE)
// Use this structure for DSPROPERTY_EAX20LISTENER_ALLPARAMETERS
// - all levels are hundredths of decibels
// - all times are in seconds
// - the reference for high frequency controls is 5 kHz
//
// NOTE: This structure may change in future EAX versions.
// It is recommended to initialize fields by name:
// myListener.lRoom = -1000;
// myListener.lRoomHF = -100;
// ...
// myListener.dwFlags = myFlags /* see EAXLISTENERFLAGS below */ ;
// instead of:
// myListener = { -1000, -100, ... , 0x00000009 };
// If you want to save and load presets in binary form, you
// should define your own structure to insure future compatibility.
//
typedef struct _EAX20LISTENERPROPERTIES
{
long lRoom; // room effect level at low frequencies
long lRoomHF; // room effect high-frequency level re. low frequency level
float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
float flDecayTime; // reverberation decay time at low frequencies
float flDecayHFRatio; // high-frequency to low-frequency decay time ratio
long lReflections; // early reflections level relative to room effect
float flReflectionsDelay; // initial reflection delay time
long lReverb; // late reverberation level relative to room effect
float flReverbDelay; // late reverberation delay time relative to initial reflection
unsigned long dwEnvironment; // sets all listener properties
float flEnvironmentSize; // environment size in meters
float flEnvironmentDiffusion; // environment diffusion
float flAirAbsorptionHF; // change in level per meter at 5 kHz
unsigned long dwFlags; // modifies the behavior of properties
} EAX20LISTENERPROPERTIES, *LPEAX20LISTENERPROPERTIES;
// used by DSPROPERTY_EAX20LISTENER_ENVIRONMENT
enum
{
EAX20_ENVIRONMENT_GENERIC,
EAX20_ENVIRONMENT_PADDEDCELL,
EAX20_ENVIRONMENT_ROOM,
EAX20_ENVIRONMENT_BATHROOM,
EAX20_ENVIRONMENT_LIVINGROOM,
EAX20_ENVIRONMENT_STONEROOM,
EAX20_ENVIRONMENT_AUDITORIUM,
EAX20_ENVIRONMENT_CONCERTHALL,
EAX20_ENVIRONMENT_CAVE,
EAX20_ENVIRONMENT_ARENA,
EAX20_ENVIRONMENT_HANGAR,
EAX20_ENVIRONMENT_CARPETEDHALLWAY,
EAX20_ENVIRONMENT_HALLWAY,
EAX20_ENVIRONMENT_STONECORRIDOR,
EAX20_ENVIRONMENT_ALLEY,
EAX20_ENVIRONMENT_FOREST,
EAX20_ENVIRONMENT_CITY,
EAX20_ENVIRONMENT_MOUNTAINS,
EAX20_ENVIRONMENT_QUARRY,
EAX20_ENVIRONMENT_PLAIN,
EAX20_ENVIRONMENT_PARKINGLOT,
EAX20_ENVIRONMENT_SEWERPIPE,
EAX20_ENVIRONMENT_UNDERWATER,
EAX20_ENVIRONMENT_DRUGGED,
EAX20_ENVIRONMENT_DIZZY,
EAX20_ENVIRONMENT_PSYCHOTIC,
EAX20_ENVIRONMENT_COUNT
};
// Used by DS20PROPERTY_EAXLISTENER_FLAGS
//
// Note: The number and order of flags may change in future EAX versions.
// It is recommended to use the flag defines as follows:
// myFlags = EAXLISTENERFLAGS_DECAYTIMESCALE | EAXLISTENERFLAGS_REVERBSCALE;
// instead of:
// myFlags = 0x00000009;
//
// These flags determine what properties are affected by environment size.
#define EAX20LISTENERFLAGS_DECAYTIMESCALE 0x00000001 // reverberation decay time
#define EAX20LISTENERFLAGS_REFLECTIONSSCALE 0x00000002 // reflection level
#define EAX20LISTENERFLAGS_REFLECTIONSDELAYSCALE 0x00000004 // initial reflection delay time
#define EAX20LISTENERFLAGS_REVERBSCALE 0x00000008 // reflections level
#define EAX20LISTENERFLAGS_REVERBDELAYSCALE 0x00000010 // late reverberation delay time
// This flag limits high-frequency decay time according to air absorption.
#define EAX20LISTENERFLAGS_DECAYHFLIMIT 0x00000020
#define EAX20LISTENERFLAGS_RESERVED 0xFFFFFFC0 // reserved future use
// property ranges and defaults:
#define EAX20LISTENER_MINROOM (-10000)
#define EAX20LISTENER_MAXROOM 0
#define EAX20LISTENER_DEFAULTROOM (-1000)
#define EAX20LISTENER_MINROOMHF (-10000)
#define EAX20LISTENER_MAXROOMHF 0
#define EAX20LISTENER_DEFAULTROOMHF (-100)
#define EAX20LISTENER_MINROOMROLLOFFFACTOR 0.0f
#define EAX20LISTENER_MAXROOMROLLOFFFACTOR 10.0f
#define EAX20LISTENER_DEFAULTROOMROLLOFFFACTOR 0.0f
#define EAX20LISTENER_MINDECAYTIME 0.1f
#define EAX20LISTENER_MAXDECAYTIME 20.0f
#define EAX20LISTENER_DEFAULTDECAYTIME 1.49f
#define EAX20LISTENER_MINDECAYHFRATIO 0.1f
#define EAX20LISTENER_MAXDECAYHFRATIO 2.0f
#define EAX20LISTENER_DEFAULTDECAYHFRATIO 0.83f
#define EAX20LISTENER_MINREFLECTIONS (-10000)
#define EAX20LISTENER_MAXREFLECTIONS 1000
#define EAX20LISTENER_DEFAULTREFLECTIONS (-2602)
#define EAX20LISTENER_MINREFLECTIONSDELAY 0.0f
#define EAX20LISTENER_MAXREFLECTIONSDELAY 0.3f
#define EAX20LISTENER_DEFAULTREFLECTIONSDELAY 0.007f
#define EAX20LISTENER_MINREVERB (-10000)
#define EAX20LISTENER_MAXREVERB 2000
#define EAX20LISTENER_DEFAULTREVERB 200
#define EAX20LISTENER_MINREVERBDELAY 0.0f
#define EAX20LISTENER_MAXREVERBDELAY 0.1f
#define EAX20LISTENER_DEFAULTREVERBDELAY 0.011f
#define EAX20LISTENER_MINENVIRONMENT 0
#define EAX20LISTENER_MAXENVIRONMENT (EAX_ENVIRONMENT_COUNT-1)
#define EAX20LISTENER_DEFAULTENVIRONMENT EAX_ENVIRONMENT_GENERIC
#define EAX20LISTENER_MINENVIRONMENTSIZE 1.0f
#define EAX20LISTENER_MAXENVIRONMENTSIZE 100.0f
#define EAX20LISTENER_DEFAULTENVIRONMENTSIZE 7.5f
#define EAX20LISTENER_MINENVIRONMENTDIFFUSION 0.0f
#define EAX20LISTENER_MAXENVIRONMENTDIFFUSION 1.0f
#define EAX20LISTENER_DEFAULTENVIRONMENTDIFFUSION 1.0f
#define EAX20LISTENER_MINAIRABSORPTIONHF (-100.0f)
#define EAX20LISTENER_MAXAIRABSORPTIONHF 0.0f
#define EAX20LISTENER_DEFAULTAIRABSORPTIONHF (-5.0f)
#define EAX20LISTENER_DEFAULTFLAGS (EAX20LISTENERFLAGS_DECAYTIMESCALE | \
EAX20LISTENERFLAGS_REFLECTIONSSCALE | \
EAX20LISTENERFLAGS_REFLECTIONSDELAYSCALE | \
EAX20LISTENERFLAGS_REVERBSCALE | \
EAX20LISTENERFLAGS_REVERBDELAYSCALE | \
EAX20LISTENERFLAGS_DECAYHFLIMIT)
/*
* EAX 2.0 buffer property set {0306A6A7-B224-11d2-99E5-0000E8D8C722}
*/
DEFINE_GUID(DSPROPSETID_EAX20_BufferProperties,
0x306a6a7,
0xb224,
0x11d2,
0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22);
// For compatibility with future EAX versions:
#define DSPROPSETID_EAX20_BufferProperties DSPROPSETID_EAX20_BufferProperties
typedef enum
{
DSPROPERTY_EAX20BUFFER_NONE,
DSPROPERTY_EAX20BUFFER_ALLPARAMETERS,
DSPROPERTY_EAX20BUFFER_DIRECT,
DSPROPERTY_EAX20BUFFER_DIRECTHF,
DSPROPERTY_EAX20BUFFER_ROOM,
DSPROPERTY_EAX20BUFFER_ROOMHF,
DSPROPERTY_EAX20BUFFER_ROOMROLLOFFFACTOR,
DSPROPERTY_EAX20BUFFER_OBSTRUCTION,
DSPROPERTY_EAX20BUFFER_OBSTRUCTIONLFRATIO,
DSPROPERTY_EAX20BUFFER_OCCLUSION,
DSPROPERTY_EAX20BUFFER_OCCLUSIONLFRATIO,
DSPROPERTY_EAX20BUFFER_OCCLUSIONROOMRATIO,
DSPROPERTY_EAX20BUFFER_OUTSIDEVOLUMEHF,
DSPROPERTY_EAX20BUFFER_AIRABSORPTIONFACTOR,
DSPROPERTY_EAX20BUFFER_FLAGS
} DSPROPERTY_EAX20_BUFFERPROPERTY;
// OR these flags with property id
#define DSPROPERTY_EAX20BUFFER_IMMEDIATE 0x00000000 // changes take effect immediately
#define DSPROPERTY_EAX20BUFFER_DEFERRED 0x80000000 // changes take effect later
#define DSPROPERTY_EAX20BUFFER_COMMITDEFERREDSETTINGS (DSPROPERTY_EAX20BUFFER_NONE | \
DSPROPERTY_EAX20BUFFER_IMMEDIATE)
// Use this structure for DSPROPERTY_EAX20BUFFER_ALLPARAMETERS
// - all levels are hundredths of decibels
//
// NOTE: This structure may change in future EAX versions.
// It is recommended to initialize fields by name:
// myBuffer.lDirect = 0;
// myBuffer.lDirectHF = -200;
// ...
// myBuffer.dwFlags = myFlags /* see EAXBUFFERFLAGS below */ ;
// instead of:
// myBuffer = { 0, -200, ... , 0x00000003 };
//
typedef struct _EAX20BUFFERPROPERTIES
{
long lDirect; // direct path level
long lDirectHF; // direct path level at high frequencies
long lRoom; // room effect level
long lRoomHF; // room effect level at high frequencies
float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
long lObstruction; // main obstruction control (attenuation at high frequencies)
float flObstructionLFRatio; // obstruction low-frequency level re. main control
long lOcclusion; // main occlusion control (attenuation at high frequencies)
float flOcclusionLFRatio; // occlusion low-frequency level re. main control
float flOcclusionRoomRatio; // occlusion room effect level re. main control
long lOutsideVolumeHF; // outside sound cone level at high frequencies
float flAirAbsorptionFactor; // multiplies DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF
unsigned long dwFlags; // modifies the behavior of properties
} EAX20BUFFERPROPERTIES, *LPEAX20BUFFERPROPERTIES;
// Used by DSPROPERTY_EAX20BUFFER_FLAGS
// TRUE: value is computed automatically - property is an offset
// FALSE: value is used directly
//
// Note: The number and order of flags may change in future EAX versions.
// To insure future compatibility, use flag defines as follows:
// myFlags = EAXBUFFERFLAGS_DIRECTHFAUTO | EAXBUFFERFLAGS_ROOMAUTO;
// instead of:
// myFlags = 0x00000003;
//
#define EAX20BUFFERFLAGS_DIRECTHFAUTO 0x00000001 // affects DSPROPERTY_EAXBUFFER_DIRECTHF
#define EAX20BUFFERFLAGS_ROOMAUTO 0x00000002 // affects DSPROPERTY_EAXBUFFER_ROOM
#define EAX20BUFFERFLAGS_ROOMHFAUTO 0x00000004 // affects DSPROPERTY_EAXBUFFER_ROOMHF
#define EAX20BUFFERFLAGS_RESERVED 0xFFFFFFF8 // reserved future use
// property ranges and defaults:
#define EAX20BUFFER_MINDIRECT (-10000)
#define EAX20BUFFER_MAXDIRECT 1000
#define EAX20BUFFER_DEFAULTDIRECT 0
#define EAX20BUFFER_MINDIRECTHF (-10000)
#define EAX20BUFFER_MAXDIRECTHF 0
#define EAX20BUFFER_DEFAULTDIRECTHF 0
#define EAX20BUFFER_MINROOM (-10000)
#define EAX20BUFFER_MAXROOM 1000
#define EAX20BUFFER_DEFAULTROOM 0
#define EAX20BUFFER_MINROOMHF (-10000)
#define EAX20BUFFER_MAXROOMHF 0
#define EAX20BUFFER_DEFAULTROOMHF 0
#define EAX20BUFFER_MINROOMROLLOFFFACTOR 0.0f
#define EAX20BUFFER_MAXROOMROLLOFFFACTOR 10.f
#define EAX20BUFFER_DEFAULTROOMROLLOFFFACTOR 0.0f
#define EAX20BUFFER_MINOBSTRUCTION (-10000)
#define EAX20BUFFER_MAXOBSTRUCTION 0
#define EAX20BUFFER_DEFAULTOBSTRUCTION 0
#define EAX20BUFFER_MINOBSTRUCTIONLFRATIO 0.0f
#define EAX20BUFFER_MAXOBSTRUCTIONLFRATIO 1.0f
#define EAX20BUFFER_DEFAULTOBSTRUCTIONLFRATIO 0.0f
#define EAX20BUFFER_MINOCCLUSION (-10000)
#define EAX20BUFFER_MAXOCCLUSION 0
#define EAX20BUFFER_DEFAULTOCCLUSION 0
#define EAX20BUFFER_MINOCCLUSIONLFRATIO 0.0f
#define EAX20BUFFER_MAXOCCLUSIONLFRATIO 1.0f
#define EAX20BUFFER_DEFAULTOCCLUSIONLFRATIO 0.25f
#define EAX20BUFFER_MINOCCLUSIONROOMRATIO 0.0f
#define EAX20BUFFER_MAXOCCLUSIONROOMRATIO 10.0f
#define EAX20BUFFER_DEFAULTOCCLUSIONROOMRATIO 0.5f
#define EAX20BUFFER_MINOUTSIDEVOLUMEHF (-10000)
#define EAX20BUFFER_MAXOUTSIDEVOLUMEHF 0
#define EAX20BUFFER_DEFAULTOUTSIDEVOLUMEHF 0
#define EAX20BUFFER_MINAIRABSORPTIONFACTOR 0.0f
#define EAX20BUFFER_MAXAIRABSORPTIONFACTOR 10.0f
#define EAX20BUFFER_DEFAULTAIRABSORPTIONFACTOR 1.0f
#define EAX20BUFFER_DEFAULTFLAGS (EAX20BUFFERFLAGS_DIRECTHFAUTO | \
EAX20BUFFERFLAGS_ROOMAUTO | \
EAX20BUFFERFLAGS_ROOMHFAUTO)
#pragma pack(pop)
#ifdef __cplusplus
}
#endif // __cplusplus
#endif

547
neo/openal/include/eax3.h Normal file
View File

@@ -0,0 +1,547 @@
/*******************************************************************\
* *
* EAX.H - Environmental Audio Extensions version 3.0 *
* for OpenAL and DirectSound3D *
* *
********************************************************************/
#ifndef EAX30_H_INCLUDED
#define EAX30_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#ifndef OPENAL
#include <dsound.h>
/*
* EAX Wrapper Interface (using Direct X 7) {4FF53B81-1CE0-11d3-AAB8-00A0C95949D5}
*/
DEFINE_GUID(CLSID_EAXDirectSound,
0x4ff53b81,
0x1ce0,
0x11d3,
0xaa, 0xb8, 0x0, 0xa0, 0xc9, 0x59, 0x49, 0xd5);
/*
* EAX Wrapper Interface (using Direct X 8) {CA503B60-B176-11d4-A094-D0C0BF3A560C}
*/
DEFINE_GUID(CLSID_EAXDirectSound8,
0xca503b60,
0xb176,
0x11d4,
0xa0, 0x94, 0xd0, 0xc0, 0xbf, 0x3a, 0x56, 0xc);
#ifdef DIRECTSOUND_VERSION
#if DIRECTSOUND_VERSION == 0x0800
__declspec(dllimport) HRESULT WINAPI EAXDirectSoundCreate8(GUID*, LPDIRECTSOUND8*, IUnknown FAR *);
typedef HRESULT (FAR PASCAL *LPEAXDIRECTSOUNDCREATE8)(GUID*, LPDIRECTSOUND8*, IUnknown FAR*);
#endif
#endif
__declspec(dllimport) HRESULT WINAPI EAXDirectSoundCreate(GUID*, LPDIRECTSOUND*, IUnknown FAR *);
typedef HRESULT (FAR PASCAL *LPEAXDIRECTSOUNDCREATE)(GUID*, LPDIRECTSOUND*, IUnknown FAR*);
#else // OPENAL
//#include <al.h>
#ifndef GUID_DEFINED
#define GUID_DEFINED
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#endif // !GUID_DEFINED
#ifndef DEFINE_GUID
#ifndef INITGUID
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID /*FAR*/ name
#else
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#endif // INITGUID
#endif // DEFINE_GUID
/*
* EAX OpenAL Extension
*/
typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
typedef ALboolean (*EAXSetBufferMode)(ALsizei,ALuint*,ALint);
typedef ALenum (*EAXGetBufferMode)(ALuint,ALint*);
#endif
#pragma pack(push, 4)
/*
* EAX 3.0 listener property set {A8FA6880-B476-11d3-BDB9-00C0F02DDF87}
*/
DEFINE_GUID(DSPROPSETID_EAX30_ListenerProperties,
0xa8fa6882,
0xb476,
0x11d3,
0xbd, 0xb9, 0x00, 0xc0, 0xf0, 0x2d, 0xdf, 0x87);
// For compatibility with future EAX versions:
#define DSPROPSETID_EAX_ListenerProperties DSPROPSETID_EAX30_ListenerProperties
typedef enum
{
DSPROPERTY_EAXLISTENER_NONE,
DSPROPERTY_EAXLISTENER_ALLPARAMETERS,
DSPROPERTY_EAXLISTENER_ENVIRONMENT,
DSPROPERTY_EAXLISTENER_ENVIRONMENTSIZE,
DSPROPERTY_EAXLISTENER_ENVIRONMENTDIFFUSION,
DSPROPERTY_EAXLISTENER_ROOM,
DSPROPERTY_EAXLISTENER_ROOMHF,
DSPROPERTY_EAXLISTENER_ROOMLF,
DSPROPERTY_EAXLISTENER_DECAYTIME,
DSPROPERTY_EAXLISTENER_DECAYHFRATIO,
DSPROPERTY_EAXLISTENER_DECAYLFRATIO,
DSPROPERTY_EAXLISTENER_REFLECTIONS,
DSPROPERTY_EAXLISTENER_REFLECTIONSDELAY,
DSPROPERTY_EAXLISTENER_REFLECTIONSPAN,
DSPROPERTY_EAXLISTENER_REVERB,
DSPROPERTY_EAXLISTENER_REVERBDELAY,
DSPROPERTY_EAXLISTENER_REVERBPAN,
DSPROPERTY_EAXLISTENER_ECHOTIME,
DSPROPERTY_EAXLISTENER_ECHODEPTH,
DSPROPERTY_EAXLISTENER_MODULATIONTIME,
DSPROPERTY_EAXLISTENER_MODULATIONDEPTH,
DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF,
DSPROPERTY_EAXLISTENER_HFREFERENCE,
DSPROPERTY_EAXLISTENER_LFREFERENCE,
DSPROPERTY_EAXLISTENER_ROOMROLLOFFFACTOR,
DSPROPERTY_EAXLISTENER_FLAGS
} DSPROPERTY_EAX_LISTENERPROPERTY;
// OR these flags with property id
#define DSPROPERTY_EAXLISTENER_IMMEDIATE 0x00000000 // changes take effect immediately
#define DSPROPERTY_EAXLISTENER_DEFERRED 0x80000000 // changes take effect later
#define DSPROPERTY_EAXLISTENER_COMMITDEFERREDSETTINGS (DSPROPERTY_EAXLISTENER_NONE | \
DSPROPERTY_EAXLISTENER_IMMEDIATE)
#ifndef EAXVECTOR_DEFINED
#define EAXVECTOR_DEFINED
typedef struct _EAXVECTOR {
float x;
float y;
float z;
} EAXVECTOR;
#endif
// Use this structure for DSPROPERTY_EAXLISTENER_ALLPARAMETERS
// - all levels are hundredths of decibels
// - all times and delays are in seconds
//
// NOTE: This structure may change in future EAX versions.
// It is recommended to initialize fields by name:
// myListener.lRoom = -1000;
// myListener.lRoomHF = -100;
// ...
// myListener.dwFlags = myFlags /* see EAXLISTENERFLAGS below */ ;
// instead of:
// myListener = { -1000, -100, ... , 0x00000009 };
// If you want to save and load presets in binary form, you
// should define your own structure to insure future compatibility.
//
typedef struct _EAXLISTENERPROPERTIES
{
unsigned long ulEnvironment; // sets all listener properties
float flEnvironmentSize; // environment size in meters
float flEnvironmentDiffusion; // environment diffusion
long lRoom; // room effect level (at mid frequencies)
long lRoomHF; // relative room effect level at high frequencies
long lRoomLF; // relative room effect level at low frequencies
float flDecayTime; // reverberation decay time at mid frequencies
float flDecayHFRatio; // high-frequency to mid-frequency decay time ratio
float flDecayLFRatio; // low-frequency to mid-frequency decay time ratio
long lReflections; // early reflections level relative to room effect
float flReflectionsDelay; // initial reflection delay time
EAXVECTOR vReflectionsPan; // early reflections panning vector
long lReverb; // late reverberation level relative to room effect
float flReverbDelay; // late reverberation delay time relative to initial reflection
EAXVECTOR vReverbPan; // late reverberation panning vector
float flEchoTime; // echo time
float flEchoDepth; // echo depth
float flModulationTime; // modulation time
float flModulationDepth; // modulation depth
float flAirAbsorptionHF; // change in level per meter at high frequencies
float flHFReference; // reference high frequency
float flLFReference; // reference low frequency
float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
unsigned long ulFlags; // modifies the behavior of properties
} EAXLISTENERPROPERTIES, *LPEAXLISTENERPROPERTIES;
// used by DSPROPERTY_EAXLISTENER_ENVIRONMENT
#ifndef EAX_ENVIRONMENTS_DEFINED
#define EAX_ENVIRONMENTS_DEFINED
enum
{
EAX_ENVIRONMENT_GENERIC,
EAX_ENVIRONMENT_PADDEDCELL,
EAX_ENVIRONMENT_ROOM,
EAX_ENVIRONMENT_BATHROOM,
EAX_ENVIRONMENT_LIVINGROOM,
EAX_ENVIRONMENT_STONEROOM,
EAX_ENVIRONMENT_AUDITORIUM,
EAX_ENVIRONMENT_CONCERTHALL,
EAX_ENVIRONMENT_CAVE,
EAX_ENVIRONMENT_ARENA,
EAX_ENVIRONMENT_HANGAR,
EAX_ENVIRONMENT_CARPETEDHALLWAY,
EAX_ENVIRONMENT_HALLWAY,
EAX_ENVIRONMENT_STONECORRIDOR,
EAX_ENVIRONMENT_ALLEY,
EAX_ENVIRONMENT_FOREST,
EAX_ENVIRONMENT_CITY,
EAX_ENVIRONMENT_MOUNTAINS,
EAX_ENVIRONMENT_QUARRY,
EAX_ENVIRONMENT_PLAIN,
EAX_ENVIRONMENT_PARKINGLOT,
EAX_ENVIRONMENT_SEWERPIPE,
EAX_ENVIRONMENT_UNDERWATER,
EAX_ENVIRONMENT_DRUGGED,
EAX_ENVIRONMENT_DIZZY,
EAX_ENVIRONMENT_PSYCHOTIC,
EAX_ENVIRONMENT_UNDEFINED,
EAX_ENVIRONMENT_COUNT
};
#endif
// Used by DSPROPERTY_EAXLISTENER_FLAGS
//
// Note: The number and order of flags may change in future EAX versions.
// It is recommended to use the flag defines as follows:
// myFlags = EAXLISTENERFLAGS_DECAYTIMESCALE | EAXLISTENERFLAGS_REVERBSCALE;
// instead of:
// myFlags = 0x00000009;
//
// These flags determine what properties are affected by environment size.
#define EAXLISTENERFLAGS_DECAYTIMESCALE 0x00000001 // reverberation decay time
#define EAXLISTENERFLAGS_REFLECTIONSSCALE 0x00000002 // reflection level
#define EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE 0x00000004 // initial reflection delay time
#define EAXLISTENERFLAGS_REVERBSCALE 0x00000008 // reflections level
#define EAXLISTENERFLAGS_REVERBDELAYSCALE 0x00000010 // late reverberation delay time
#define EAXLISTENERFLAGS_ECHOTIMESCALE 0x00000040 // echo time
#define EAXLISTENERFLAGS_MODULATIONTIMESCALE 0x00000080 // modulation time
// This flag limits high-frequency decay time according to air absorption.
#define EAXLISTENERFLAGS_DECAYHFLIMIT 0x00000020
#define EAXLISTENERFLAGS_RESERVED 0xFFFFFF00 // reserved future use
// Property ranges and defaults:
#define EAXLISTENER_MINENVIRONMENT 0
#define EAXLISTENER_MAXENVIRONMENT (EAX_ENVIRONMENT_COUNT-1)
#define EAXLISTENER_DEFAULTENVIRONMENT EAX_ENVIRONMENT_GENERIC
#define EAXLISTENER_MINENVIRONMENTSIZE 1.0f
#define EAXLISTENER_MAXENVIRONMENTSIZE 100.0f
#define EAXLISTENER_DEFAULTENVIRONMENTSIZE 7.5f
#define EAXLISTENER_MINENVIRONMENTDIFFUSION 0.0f
#define EAXLISTENER_MAXENVIRONMENTDIFFUSION 1.0f
#define EAXLISTENER_DEFAULTENVIRONMENTDIFFUSION 1.0f
#define EAXLISTENER_MINROOM (-10000)
#define EAXLISTENER_MAXROOM 0
#define EAXLISTENER_DEFAULTROOM (-1000)
#define EAXLISTENER_MINROOMHF (-10000)
#define EAXLISTENER_MAXROOMHF 0
#define EAXLISTENER_DEFAULTROOMHF (-100)
#define EAXLISTENER_MINROOMLF (-10000)
#define EAXLISTENER_MAXROOMLF 0
#define EAXLISTENER_DEFAULTROOMLF 0
#define EAXLISTENER_MINDECAYTIME 0.1f
#define EAXLISTENER_MAXDECAYTIME 20.0f
#define EAXLISTENER_DEFAULTDECAYTIME 1.49f
#define EAXLISTENER_MINDECAYHFRATIO 0.1f
#define EAXLISTENER_MAXDECAYHFRATIO 2.0f
#define EAXLISTENER_DEFAULTDECAYHFRATIO 0.83f
#define EAXLISTENER_MINDECAYLFRATIO 0.1f
#define EAXLISTENER_MAXDECAYLFRATIO 2.0f
#define EAXLISTENER_DEFAULTDECAYLFRATIO 1.00f
#define EAXLISTENER_MINREFLECTIONS (-10000)
#define EAXLISTENER_MAXREFLECTIONS 1000
#define EAXLISTENER_DEFAULTREFLECTIONS (-2602)
#define EAXLISTENER_MINREFLECTIONSDELAY 0.0f
#define EAXLISTENER_MAXREFLECTIONSDELAY 0.3f
#define EAXLISTENER_DEFAULTREFLECTIONSDELAY 0.007f
#define EAXLISTENER_MINREVERB (-10000)
#define EAXLISTENER_MAXREVERB 2000
#define EAXLISTENER_DEFAULTREVERB 200
#define EAXLISTENER_MINREVERBDELAY 0.0f
#define EAXLISTENER_MAXREVERBDELAY 0.1f
#define EAXLISTENER_DEFAULTREVERBDELAY 0.011f
#define EAXLISTENER_MINECHOTIME 0.075f
#define EAXLISTENER_MAXECHOTIME 0.25f
#define EAXLISTENER_DEFAULTECHOTIME 0.25f
#define EAXLISTENER_MINECHODEPTH 0.0f
#define EAXLISTENER_MAXECHODEPTH 1.0f
#define EAXLISTENER_DEFAULTECHODEPTH 0.0f
#define EAXLISTENER_MINMODULATIONTIME 0.04f
#define EAXLISTENER_MAXMODULATIONTIME 4.0f
#define EAXLISTENER_DEFAULTMODULATIONTIME 0.25f
#define EAXLISTENER_MINMODULATIONDEPTH 0.0f
#define EAXLISTENER_MAXMODULATIONDEPTH 1.0f
#define EAXLISTENER_DEFAULTMODULATIONDEPTH 0.0f
#define EAXLISTENER_MINAIRABSORPTIONHF (-100.0f)
#define EAXLISTENER_MAXAIRABSORPTIONHF 0.0f
#define EAXLISTENER_DEFAULTAIRABSORPTIONHF (-5.0f)
#define EAXLISTENER_MINHFREFERENCE 1000.0f
#define EAXLISTENER_MAXHFREFERENCE 20000.0f
#define EAXLISTENER_DEFAULTHFREFERENCE 5000.0f
#define EAXLISTENER_MINLFREFERENCE 20.0f
#define EAXLISTENER_MAXLFREFERENCE 1000.0f
#define EAXLISTENER_DEFAULTLFREFERENCE 250.0f
#define EAXLISTENER_MINROOMROLLOFFFACTOR 0.0f
#define EAXLISTENER_MAXROOMROLLOFFFACTOR 10.0f
#define EAXLISTENER_DEFAULTROOMROLLOFFFACTOR 0.0f
#define EAXLISTENER_DEFAULTFLAGS (EAXLISTENERFLAGS_DECAYTIMESCALE | \
EAXLISTENERFLAGS_REFLECTIONSSCALE | \
EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE | \
EAXLISTENERFLAGS_REVERBSCALE | \
EAXLISTENERFLAGS_REVERBDELAYSCALE | \
EAXLISTENERFLAGS_DECAYHFLIMIT)
/*
* EAX 3.0 buffer property set {A8FA6881-B476-11d3-BDB9-00C0F02DDF87}
*/
DEFINE_GUID(DSPROPSETID_EAX30_BufferProperties,
0xa8fa6881,
0xb476,
0x11d3,
0xbd, 0xb9, 0x0, 0xc0, 0xf0, 0x2d, 0xdf, 0x87);
// For compatibility with future EAX versions:
#define DSPROPSETID_EAX_BufferProperties DSPROPSETID_EAX30_BufferProperties
#define DSPROPSETID_EAX_SourceProperties DSPROPSETID_EAX30_BufferProperties
typedef enum
{
DSPROPERTY_EAXBUFFER_NONE,
DSPROPERTY_EAXBUFFER_ALLPARAMETERS,
DSPROPERTY_EAXBUFFER_OBSTRUCTIONPARAMETERS,
DSPROPERTY_EAXBUFFER_OCCLUSIONPARAMETERS,
DSPROPERTY_EAXBUFFER_EXCLUSIONPARAMETERS,
DSPROPERTY_EAXBUFFER_DIRECT,
DSPROPERTY_EAXBUFFER_DIRECTHF,
DSPROPERTY_EAXBUFFER_ROOM,
DSPROPERTY_EAXBUFFER_ROOMHF,
DSPROPERTY_EAXBUFFER_OBSTRUCTION,
DSPROPERTY_EAXBUFFER_OBSTRUCTIONLFRATIO,
DSPROPERTY_EAXBUFFER_OCCLUSION,
DSPROPERTY_EAXBUFFER_OCCLUSIONLFRATIO,
DSPROPERTY_EAXBUFFER_OCCLUSIONROOMRATIO,
DSPROPERTY_EAXBUFFER_OCCLUSIONDIRECTRATIO,
DSPROPERTY_EAXBUFFER_EXCLUSION,
DSPROPERTY_EAXBUFFER_EXCLUSIONLFRATIO,
DSPROPERTY_EAXBUFFER_OUTSIDEVOLUMEHF,
DSPROPERTY_EAXBUFFER_DOPPLERFACTOR,
DSPROPERTY_EAXBUFFER_ROLLOFFFACTOR,
DSPROPERTY_EAXBUFFER_ROOMROLLOFFFACTOR,
DSPROPERTY_EAXBUFFER_AIRABSORPTIONFACTOR,
DSPROPERTY_EAXBUFFER_FLAGS
} DSPROPERTY_EAX_BUFFERPROPERTY;
// OR these flags with property id
#define DSPROPERTY_EAXBUFFER_IMMEDIATE 0x00000000 // changes take effect immediately
#define DSPROPERTY_EAXBUFFER_DEFERRED 0x80000000 // changes take effect later
#define DSPROPERTY_EAXBUFFER_COMMITDEFERREDSETTINGS (DSPROPERTY_EAXBUFFER_NONE | \
DSPROPERTY_EAXBUFFER_IMMEDIATE)
// Use this structure for DSPROPERTY_EAXBUFFER_ALLPARAMETERS
// - all levels are hundredths of decibels
// - all delays are in seconds
//
// NOTE: This structure may change in future EAX versions.
// It is recommended to initialize fields by name:
// myBuffer.lDirect = 0;
// myBuffer.lDirectHF = -200;
// ...
// myBuffer.dwFlags = myFlags /* see EAXBUFFERFLAGS below */ ;
// instead of:
// myBuffer = { 0, -200, ... , 0x00000003 };
//
typedef struct _EAXBUFFERPROPERTIES
{
long lDirect; // direct path level (at low and mid frequencies)
long lDirectHF; // relative direct path level at high frequencies
long lRoom; // room effect level (at low and mid frequencies)
long lRoomHF; // relative room effect level at high frequencies
long lObstruction; // main obstruction control (attenuation at high frequencies)
float flObstructionLFRatio; // obstruction low-frequency level re. main control
long lOcclusion; // main occlusion control (attenuation at high frequencies)
float flOcclusionLFRatio; // occlusion low-frequency level re. main control
float flOcclusionRoomRatio; // relative occlusion control for room effect
float flOcclusionDirectRatio; // relative occlusion control for direct path
long lExclusion; // main exlusion control (attenuation at high frequencies)
float flExclusionLFRatio; // exclusion low-frequency level re. main control
long lOutsideVolumeHF; // outside sound cone level at high frequencies
float flDopplerFactor; // like DS3D flDopplerFactor but per source
float flRolloffFactor; // like DS3D flRolloffFactor but per source
float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
float flAirAbsorptionFactor; // multiplies DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF
unsigned long ulFlags; // modifies the behavior of properties
} EAXBUFFERPROPERTIES, *LPEAXBUFFERPROPERTIES;
// Use this structure for DSPROPERTY_EAXBUFFER_OBSTRUCTION,
#ifndef EAX_OBSTRUCTIONPROPERTIES_DEFINED
#define EAX_OBSTRUCTIONPROPERTIES_DEFINED
typedef struct _EAXOBSTRUCTIONPROPERTIES
{
long lObstruction;
float flObstructionLFRatio;
} EAXOBSTRUCTIONPROPERTIES, *LPEAXOBSTRUCTIONPROPERTIES;
#endif
// Use this structure for DSPROPERTY_EAXBUFFER_OCCLUSION
#ifndef EAX_OCCLUSIONPROPERTIES_DEFINED
#define EAX_OCCLUSIONPROPERTIES_DEFINED
typedef struct _EAXOCCLUSIONPROPERTIES
{
long lOcclusion;
float flOcclusionLFRatio;
float flOcclusionRoomRatio;
float flOcclusionDirectRatio;
} EAXOCCLUSIONPROPERTIES, *LPEAXOCCLUSIONPROPERTIES;
#endif
// Use this structure for DSPROPERTY_EAXBUFFER_EXCLUSION
#ifndef EAX_EXCLUSIONPROPERTIES_DEFINED
#define EAX_EXCLUSIONPROPERTIES_DEFINED
typedef struct _EAXEXCLUSIONPROPERTIES
{
long lExclusion;
float flExclusionLFRatio;
} EAXEXCLUSIONPROPERTIES, *LPEAXEXCLUSIONPROPERTIES;
#endif
// Used by DSPROPERTY_EAXBUFFER_FLAGS
// TRUE: value is computed automatically - property is an offset
// FALSE: value is used directly
//
// Note: The number and order of flags may change in future EAX versions.
// To insure future compatibility, use flag defines as follows:
// myFlags = EAXBUFFERFLAGS_DIRECTHFAUTO | EAXBUFFERFLAGS_ROOMAUTO;
// instead of:
// myFlags = 0x00000003;
//
#define EAXBUFFERFLAGS_DIRECTHFAUTO 0x00000001 // affects DSPROPERTY_EAXBUFFER_DIRECTHF
#define EAXBUFFERFLAGS_ROOMAUTO 0x00000002 // affects DSPROPERTY_EAXBUFFER_ROOM
#define EAXBUFFERFLAGS_ROOMHFAUTO 0x00000004 // affects DSPROPERTY_EAXBUFFER_ROOMHF
#define EAXBUFFERFLAGS_RESERVED 0xFFFFFFF8 // reserved future use
// Property ranges and defaults:
#define EAXBUFFER_MINDIRECT (-10000)
#define EAXBUFFER_MAXDIRECT 1000
#define EAXBUFFER_DEFAULTDIRECT 0
#define EAXBUFFER_MINDIRECTHF (-10000)
#define EAXBUFFER_MAXDIRECTHF 0
#define EAXBUFFER_DEFAULTDIRECTHF 0
#define EAXBUFFER_MINROOM (-10000)
#define EAXBUFFER_MAXROOM 1000
#define EAXBUFFER_DEFAULTROOM 0
#define EAXBUFFER_MINROOMHF (-10000)
#define EAXBUFFER_MAXROOMHF 0
#define EAXBUFFER_DEFAULTROOMHF 0
#define EAXBUFFER_MINOBSTRUCTION (-10000)
#define EAXBUFFER_MAXOBSTRUCTION 0
#define EAXBUFFER_DEFAULTOBSTRUCTION 0
#define EAXBUFFER_MINOBSTRUCTIONLFRATIO 0.0f
#define EAXBUFFER_MAXOBSTRUCTIONLFRATIO 1.0f
#define EAXBUFFER_DEFAULTOBSTRUCTIONLFRATIO 0.0f
#define EAXBUFFER_MINOCCLUSION (-10000)
#define EAXBUFFER_MAXOCCLUSION 0
#define EAXBUFFER_DEFAULTOCCLUSION 0
#define EAXBUFFER_MINOCCLUSIONLFRATIO 0.0f
#define EAXBUFFER_MAXOCCLUSIONLFRATIO 1.0f
#define EAXBUFFER_DEFAULTOCCLUSIONLFRATIO 0.25f
#define EAXBUFFER_MINOCCLUSIONROOMRATIO 0.0f
#define EAXBUFFER_MAXOCCLUSIONROOMRATIO 10.0f
#define EAXBUFFER_DEFAULTOCCLUSIONROOMRATIO 1.5f
#define EAXBUFFER_MINOCCLUSIONDIRECTRATIO 0.0f
#define EAXBUFFER_MAXOCCLUSIONDIRECTRATIO 10.0f
#define EAXBUFFER_DEFAULTOCCLUSIONDIRECTRATIO 1.0f
#define EAXBUFFER_MINEXCLUSION (-10000)
#define EAXBUFFER_MAXEXCLUSION 0
#define EAXBUFFER_DEFAULTEXCLUSION 0
#define EAXBUFFER_MINEXCLUSIONLFRATIO 0.0f
#define EAXBUFFER_MAXEXCLUSIONLFRATIO 1.0f
#define EAXBUFFER_DEFAULTEXCLUSIONLFRATIO 1.0f
#define EAXBUFFER_MINOUTSIDEVOLUMEHF (-10000)
#define EAXBUFFER_MAXOUTSIDEVOLUMEHF 0
#define EAXBUFFER_DEFAULTOUTSIDEVOLUMEHF 0
#define EAXBUFFER_MINDOPPLERFACTOR 0.0f
#define EAXBUFFER_MAXDOPPLERFACTOR 10.f
#define EAXBUFFER_DEFAULTDOPPLERFACTOR 0.0f
#define EAXBUFFER_MINROLLOFFFACTOR 0.0f
#define EAXBUFFER_MAXROLLOFFFACTOR 10.f
#define EAXBUFFER_DEFAULTROLLOFFFACTOR 0.0f
#define EAXBUFFER_MINROOMROLLOFFFACTOR 0.0f
#define EAXBUFFER_MAXROOMROLLOFFFACTOR 10.f
#define EAXBUFFER_DEFAULTROOMROLLOFFFACTOR 0.0f
#define EAXBUFFER_MINAIRABSORPTIONFACTOR 0.0f
#define EAXBUFFER_MAXAIRABSORPTIONFACTOR 10.0f
#define EAXBUFFER_DEFAULTAIRABSORPTIONFACTOR 1.0f
#define EAXBUFFER_DEFAULTFLAGS (EAXBUFFERFLAGS_DIRECTHFAUTO | \
EAXBUFFERFLAGS_ROOMAUTO | \
EAXBUFFERFLAGS_ROOMHFAUTO )
#pragma pack(pop)
#ifdef __cplusplus
}
#endif // __cplusplus
#endif

1575
neo/openal/include/eax4.h Normal file

File diff suppressed because it is too large Load Diff

1792
neo/openal/include/eax5.h Normal file

File diff suppressed because it is too large Load Diff

232
neo/openal/include/eaxac3.h Normal file
View File

@@ -0,0 +1,232 @@
/************************************************************************************************
/
/ EAX-AC3 Open AL Extension Header file
/
/ Description : The EAX-AC3 extension to Open AL provides a way to playback Dolby Digital AC3
/ files on systems equipped with a SB Live! card. The packaged AC3 data is output
/ via the MMSYSTEM Wave device.
/ If a SB Live! 5.1 card is installed then the AC3 data will be decoded by the
/ audio card.
/ If a legacy SB Live! card is installed then the AC3 data will be sent directly
/ to the S/PDIF Out.
/ The API supports multiple EAX-AC3 devices, and multiple AC3 streams. However
/ the current implementation provides one EAX-AC3 device capable of playing
/ one AC3 Stream at a time.
/
/ Programmer : Daniel Peacock Creative Labs, Inc February 2001
/
/************************************************************************************************/
#ifndef _EAXAC3_H_
#define _EAXAC3_H_
// Do not define the symbol EAXAC3_EXPORTS in any projects that use the EAX-AC3 Open AL Extension
#ifdef EAXAC3_EXPORTS
#define EAXAC3_API __declspec(dllexport)
#else
#define EAXAC3_API __declspec(dllimport)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
typedef signed long HRESULT;
#endif
enum POSFORMAT { MILLISECONDS, BYTES, AC3FRAMES };
enum SOURCE { AC3FILE, MEMORY };
// Success Codes
#define EAXAC3_OK 0
#define EAXAC3_ALREADYPLAYING 1
#define EAXAC3_EOF 2
// Error Codes
#define EAXAC3ERR_UNABLETOOPENEAXAC3DEVICE -1
#define EAXAC3ERR_WAVEOUTPREPAREHEADERFAILURE -2
#define EAXAC3ERR_OUTOFMEMORY -3
#define EAXAC3ERR_FILENOTFOUND -4
#define EAXAC3ERR_AC3FILETOBIG -5
#define EAXAC3ERR_AC3FRAMENOTFOUND -6
#define EAXAC3ERR_AC3NOTAT48KHZ -7
#define EAXAC3ERR_INVALIDAC3FRAME -8
#define EAXAC3ERR_AC3FILENOTOPEN -9
#define EAXAC3ERR_BUFFERNOTMULTIPLEOFAC3FRAMESIZE -10
#define EAXAC3ERR_WAVEOUTERROR -11
#define EAXAC3ERR_FAILEDTOCREATEEVENT -12
#define EAXAC3ERR_EAXAC3DEVICENOTOPEN -13
#define EAXAC3ERR_AC3STREAMALREADYOPEN -14
#define EAXAC3ERR_POSITIONOUTOFRANGE -15
#define EAXAC3ERR_NOTATSTARTOFAC3FRAME -16
#define EAXAC3ERR_AC3STREAMNOTOPEN -17
#define EAXAC3ERR_SETPOSITIONONLYWORKSONAC3FILES -18
#define EAXAC3ERR_WRITEDATAONLYWORKSWITHMEMORYSTREAMS -19
#define EAXAC3ERR_INVALIDPARAMETER -20
#define EAXAC3ERR_NOTENOUGHAC3DATAINAC3DATABUFFER -21
#define EAXAC3ERR_NOTENOUGHDATA -22
#define EAXAC3ERR_EAXAC3DEVICEALREADYOPEN -23
#define EAXAC3ERR_EAXAC3DEVICENOTFOUND -24
#define EAXAC3ERR_UNSUPPORTED -25
#define EAXAC3ERR_FAILEDTOCREATEFNTABLE -26
#define DEFAULTEAXAC3DEVICE 0
#define ENTIREBUFFER 0
#define FROMWRITECURSOR 1
#define LOOPING 1
#define ENDOFDATA 1
typedef unsigned int EAXAC3HANDLE;
typedef unsigned int AC3STREAM;
// Callback function
typedef void (__stdcall *LPAC3CALLBACK)(AC3STREAM AC3Stream, int msg);
// Callback messages
#define EAXAC3NEEDMOREDATA 0
#define EAXAC3REACHEDEND 1
typedef struct
{
unsigned int nNumOfAC3Frames;
unsigned int nAC3FrameSize;
unsigned int nSizeOfFile;
unsigned int nDuration;
unsigned int nFrequency;
} AC3FILEINFO, *LPAC3FILEINFO;
#define UNKNOWN 1
#define SPDIFPASSTHRU 2
#define FULLDECODE 4
typedef struct
{
char szDeviceName[256];
unsigned int uFlags;
unsigned int uStreams;
unsigned int uReserved;
} EAXAC3DEVICEINFO, *LPEAXAC3DEVICEINFO;
// Function typedefs
typedef int (*LPEAXAC3QUERYNUMBEROFDEVICES) (void);
typedef HRESULT (*LPEAXAC3QUERYFILE) (char *, LPAC3FILEINFO, int);
typedef HRESULT (*LPEAXAC3QUERYMEMORY) (char *, int, LPAC3FILEINFO, int);
typedef int (*LPEAXAC3QUERYNOOFFRAMESREQFORPLAYBACK) (AC3STREAM);
typedef HRESULT (*LPEAXAC3OPENPLAYBACKDEVICE) (EAXAC3HANDLE);
typedef HRESULT (*LPEAXAC3CLOSEPLAYBACKDEVICE) (EAXAC3HANDLE);
typedef HRESULT (*LPEAXAC3QUERYDEVICECAPS) (EAXAC3HANDLE, LPEAXAC3DEVICEINFO, int);
typedef HRESULT (*LPEAXAC3GETPOSITION) (AC3STREAM, enum POSFORMAT, int *);
typedef HRESULT (*LPEAXAC3SETFILEPOSITION) (AC3STREAM, enum POSFORMAT, int);
typedef HRESULT (*LPEAXAC3OPENSTREAM) (EAXAC3HANDLE, AC3STREAM *, LPAC3CALLBACK, char *, enum SOURCE);
typedef HRESULT (*LPEAXAC3CLOSESTREAM) (AC3STREAM);
typedef HRESULT (*LPEAXAC3PREPLAYSTREAM) (AC3STREAM);
typedef HRESULT (*LPEAXAC3PLAYSTREAM) (AC3STREAM, int);
typedef HRESULT (*LPEAXAC3STOPSTREAM) (AC3STREAM);
typedef HRESULT (*LPEAXAC3PAUSESTREAM) (AC3STREAM);
typedef HRESULT (*LPEAXAC3RESUMESTREAM) (AC3STREAM);
typedef HRESULT (*LPEAXAC3LOCKBUFFER) (AC3STREAM, unsigned long, void **, unsigned long *, void **,
unsigned long *, unsigned long);
typedef HRESULT (*LPEAXAC3UNLOCKBUFFER) (AC3STREAM, void *, unsigned long, void *, unsigned long, int);
typedef HRESULT (*LPEAXAC3SETPLAYBACKMODE) (EAXAC3HANDLE, unsigned int);
typedef char * (*LPEAXAC3GETERRORSTRING) (HRESULT, char *, int);
typedef HRESULT (*LPEAXAC3GETLASTERROR) (HRESULT *);
// Function table declaration
typedef struct
{
LPEAXAC3QUERYNUMBEROFDEVICES EAXAC3QueryNumberOfDevices;
LPEAXAC3QUERYFILE EAXAC3QueryFile;
LPEAXAC3QUERYMEMORY EAXAC3QueryMemory;
LPEAXAC3QUERYNOOFFRAMESREQFORPLAYBACK EAXAC3QueryNoOfFramesReqForPlayback;
LPEAXAC3OPENPLAYBACKDEVICE EAXAC3OpenPlaybackDevice;
LPEAXAC3CLOSEPLAYBACKDEVICE EAXAC3ClosePlaybackDevice;
LPEAXAC3QUERYDEVICECAPS EAXAC3QueryDeviceCaps;
LPEAXAC3GETPOSITION EAXAC3GetPosition;
LPEAXAC3SETFILEPOSITION EAXAC3SetFilePosition;
LPEAXAC3OPENSTREAM EAXAC3OpenStream;
LPEAXAC3CLOSESTREAM EAXAC3CloseStream;
LPEAXAC3PREPLAYSTREAM EAXAC3PrePlayStream;
LPEAXAC3PLAYSTREAM EAXAC3PlayStream;
LPEAXAC3STOPSTREAM EAXAC3StopStream;
LPEAXAC3PAUSESTREAM EAXAC3PauseStream;
LPEAXAC3RESUMESTREAM EAXAC3ResumeStream;
LPEAXAC3LOCKBUFFER EAXAC3LockBuffer;
LPEAXAC3UNLOCKBUFFER EAXAC3UnLockBuffer;
LPEAXAC3SETPLAYBACKMODE EAXAC3SetPlaybackMode;
LPEAXAC3GETERRORSTRING EAXAC3GetErrorString;
LPEAXAC3GETLASTERROR EAXAC3GetLastError;
} EAXAC3FNTABLE, *LPEAXAC3FNTABLE;
#ifndef OPENAL
typedef EAXAC3_API HRESULT (*LPEAXAC3GETFUNCTIONTABLE) (LPEAXAC3FNTABLE);
#else
typedef ALboolean (*LPALEAXAC3GETFUNCTIONTABLE) (LPEAXAC3FNTABLE);
#endif
// Functions exposed in the DLL
EAXAC3_API HRESULT EAXAC3GetFunctionTable(LPEAXAC3FNTABLE lpEAXAC3FnTable);
EAXAC3_API int EAXAC3QueryNumberOfDevices();
EAXAC3_API HRESULT EAXAC3QueryFile(char *szAC3Filename, LPAC3FILEINFO lpAC3Caps, int nSizeOfAC3FileInfoStruct);
EAXAC3_API HRESULT EAXAC3QueryMemory(char *lpBuffer, int nSizeOfBuffer, LPAC3FILEINFO lpAC3FileInfo,
int nSizeOfAC3FileInfoStruct);
EAXAC3_API int EAXAC3QueryNoOfFramesReqForPlayback(AC3STREAM AC3Stream);
EAXAC3_API HRESULT EAXAC3OpenPlaybackDevice(EAXAC3HANDLE EAXAC3Handle);
EAXAC3_API HRESULT EAXAC3ClosePlaybackDevice(EAXAC3HANDLE EAXAC3Handle);
EAXAC3_API HRESULT EAXAC3QueryDeviceCaps(EAXAC3HANDLE EAXAC3Handle, LPEAXAC3DEVICEINFO lpEAXAC3DeviceInfo,
int nSizeOfAC3DeviceInfoStruct);
EAXAC3_API HRESULT EAXAC3GetPosition(AC3STREAM AC3Stream, enum POSFORMAT posFormat, int *lpAmount);
EAXAC3_API HRESULT EAXAC3SetFilePosition(AC3STREAM AC3Stream, enum POSFORMAT posFormat, int nAmount);
EAXAC3_API HRESULT EAXAC3OpenStream(EAXAC3HANDLE EAXAC3Handle, AC3STREAM *lpAC3Stream,
LPAC3CALLBACK pAC3CallbackFn, char *szAC3Filename, enum SOURCE src);
EAXAC3_API HRESULT EAXAC3CloseStream(AC3STREAM AC3Stream);
EAXAC3_API HRESULT EAXAC3PrePlayStream(AC3STREAM AC3Stream);
EAXAC3_API HRESULT EAXAC3PlayStream(AC3STREAM AC3Stream, int nLooping);
EAXAC3_API HRESULT EAXAC3StopStream(AC3STREAM AC3Stream);
EAXAC3_API HRESULT EAXAC3PauseStream(AC3STREAM AC3Stream);
EAXAC3_API HRESULT EAXAC3ResumeStream(AC3STREAM AC3Stream);
EAXAC3_API HRESULT EAXAC3LockBuffer(AC3STREAM AC3Stream, unsigned long ulBytes, void **ppvPointer1,
unsigned long *pdwBytes1, void **ppvPointer2, unsigned long *pdwBytes2,
unsigned long ulFlags);
EAXAC3_API HRESULT EAXAC3UnLockBuffer(AC3STREAM AC3Stream, void *pvPointer1, unsigned long ulSize1,
void *pvPointer2, unsigned long ulSize2, int nFinished);
EAXAC3_API HRESULT EAXAC3SetPlaybackMode(EAXAC3HANDLE EAXAC3Handle, unsigned int ulPlayMode);
EAXAC3_API char * EAXAC3GetErrorString(HRESULT hr, char *szErrorString, int nSizeOfErrorString);
EAXAC3_API HRESULT EAXAC3GetLastError(HRESULT *hr);
#ifdef __cplusplus
}
#endif
#endif

171
neo/openal/include/eaxman.h Normal file
View File

@@ -0,0 +1,171 @@
/*
*/
#ifndef __EAXMANH
#define __EAXMANH
#define COM_NO_WINDOWS_H
#include <objbase.h>
#include "eax3.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//#define CLSID_EAXMANAGER CLSID_EAX20_Manager
//#define IID_IEaxManager IID_EAX20_Manager
#define EM_MAX_NAME 32
#define EMFLAG_IDDEFAULT (-1)
#define EMFLAG_IDNONE (-2)
#define EMFLAG_LOCKPOSITION 1
#define EMFLAG_LOADFROMMEMORY 2
#define EMFLAG_NODIFFRACTION 4
typedef struct _EMPOINT {
float fX;
float fY;
float fZ;
} EMPOINT;
typedef EMPOINT FAR *LPEMPOINT;
typedef struct _LISTENERATTRIBUTES {
float fDistanceFactor;
float fRolloffFactor;
float fDopplerFactor;
} LISTENERATTRIBUTES;
typedef LISTENERATTRIBUTES FAR *LPLISTENERATTRIBUTES;
typedef struct _SOURCEATTRIBUTES {
EAXBUFFERPROPERTIES eaxAttributes;
unsigned long ulInsideConeAngle;
unsigned long ulOutsideConeAngle;
long lConeOutsideVolume;
float fConeXdir;
float fConeYdir;
float fConeZdir;
float fMinDistance;
float fMaxDistance;
long lDupCount;
long lPriority;
} SOURCEATTRIBUTES;
typedef SOURCEATTRIBUTES FAR *LPSOURCEATTRIBUTES;
typedef struct _MATERIALATTRIBUTES {
long lLevel;
float fLFRatio;
float fRoomRatio;
DWORD dwFlags;
} MATERIALATTRIBUTES;
typedef MATERIALATTRIBUTES FAR *LPMATERIALATTRIBUTES;
#define EMMATERIAL_OBSTRUCTS 1
#define EMMATERIAL_OCCLUDES 3
typedef struct _DIFFRACTIONBOX {
long lSubspaceID;
EMPOINT empMin;
EMPOINT empMax;
} DIFFRACTIONBOX;
typedef DIFFRACTIONBOX FAR *LPDIFFRACTIONBOX;
// {7CE4D6E6-562F-11d3-8812-005004062F83}
DEFINE_GUID(CLSID_EAXMANAGER, 0x60b721a1, 0xf7c8, 0x11d2, 0xa0, 0x2e, 0x0, 0x50, 0x4, 0x6, 0x18, 0xb8);
#ifdef __cplusplus
struct IEaxManager;
#endif // __cplusplus
typedef struct IEaxManager *LPEAXMANAGER;
// {7CE4D6E8-562F-11d3-8812-005004062F83}
DEFINE_GUID(IID_IEaxManager, 0x60b721a2, 0xf7c8, 0x11d2, 0xa0, 0x2e, 0x0, 0x50, 0x4, 0x6, 0x18, 0xb8);
#undef INTERFACE
#define INTERFACE IEaxManager
extern HRESULT __stdcall EaxManagerCreate(LPEAXMANAGER*);
typedef HRESULT (__stdcall *LPEAXMANAGERCREATE)(LPEAXMANAGER*);
DECLARE_INTERFACE_(IEaxManager, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
STDMETHOD(GetDataSetSize) (THIS_ unsigned long*, DWORD) PURE;
STDMETHOD(LoadDataSet) (THIS_ char*, DWORD) PURE;
STDMETHOD(FreeDataSet) (THIS_ DWORD) PURE;
STDMETHOD(GetListenerAttributes) (THIS_ LPLISTENERATTRIBUTES) PURE;
STDMETHOD(GetSourceID) (THIS_ char*, long*) PURE;
STDMETHOD(GetSourceAttributes) (THIS_ long, LPSOURCEATTRIBUTES) PURE;
STDMETHOD(GetSourceNumInstances) (THIS_ long, long*) PURE;
STDMETHOD(GetSourceInstancePos) (THIS_ long, long, LPEMPOINT) PURE;
STDMETHOD(GetEnvironmentID) (THIS_ char*, long*) PURE;
STDMETHOD(GetEnvironmentAttributes) (THIS_ long, LPEAXLISTENERPROPERTIES) PURE;
STDMETHOD(GetMaterialID) (THIS_ char*, long*) PURE;
STDMETHOD(GetMaterialAttributes) (THIS_ long, LPMATERIALATTRIBUTES) PURE;
STDMETHOD(GetGeometrySetID) (THIS_ char*, long*) PURE;
STDMETHOD(GetListenerDynamicAttributes) (THIS_ long, LPEMPOINT, long*, DWORD) PURE;
STDMETHOD(GetSourceDynamicAttributes) (THIS_ long, LPEMPOINT, long*, float*, long*, float*, float*, LPEMPOINT, DWORD) PURE;
// STDMETHOD(GetSubSpaceID) (THIS_ long, LPEMPOINT, long *) PURE;
STDMETHOD(GetEnvironmentName) (THIS_ long, char *szString, long lStrlen) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IEaxManager_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IEaxManager_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IEaxManager_Release(p) (p)->lpVtbl->Release(p)
#define IEaxManager_GetDataSetSize(p,a,b) (p)->lpVtbl->GetDataSetSize(p,a,b)
#define IEaxManager_LoadDataSet(p,a,b) (p)->lpVtbl->LoadDataSet(p,a,b)
#define IEaxManager_FreeDataSet(p,a) (p)->lpVtbl->FreeDataSet(p,a)
#define IEaxManager_GetListenerAttributes(p,a) (p)->lpVtbl->GetListenerAttributes(p,a)
#define IEaxManager_GetSourceID(p,a,b) (p)->lpVtbl->GetSourceID(p,a,b)
#define IEaxManager_GetSourceAttributes(p,a,b) (p)->lpVtbl->GetSourceAttributes(p,a,b)
#define IEaxManager_GetSourceNumInstances(p,a,b) (p)->lpVtbl->GetSourceNumInstances(p,a,b)
#define IEaxManager_GetSourceInstancePos(p,a,b,c) (p)->lpVtbl->GetSourceInstancePos(p,a,b,c)
#define IEaxManager_GetEnvironmentID(p,a,b) (p)->lpVtbl->GetEnvironmentID(p,a,b)
#define IEaxManager_GetEnvironmentAttributes(p,a,b) (p)->lpVtbl->GetEnvironmentAttributes(p,a,b)
#define IEaxManager_GetMaterialID(p,a,b) (p)->lpVtbl->GetMaterialID(p,a,b)
#define IEaxManager_GetMaterialAttributes(p,a,b) (p)->lpVtbl->GetMaterialAttributes(p,a,b)
#define IEaxManager_GetGeometrySetID(p,a,b) (p)->lpVtbl->GetGeometrySetID(p,a,b)
#define IEaxManager_GetListenerDynamicAttributes(p,a,b,c,d) (p)->lpVtbl->GetListenerDynamicAttributes(p,a,b,c,d)
#define IEaxManager_GetSourceDynamicAttributes(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->GetSourceDynamicAttributes(p,a,b,c,d,e,f,g,h,i)
//#define IEaxManager_GetSubSpaceID(p,a,b,c) (p)->lpVtbl->GetSubSpaceID(p,a,b,c)
#define IEaxManager_GetEnvironmentName(p,a,b,c) (p)->lpVtbl->GetEnvironmentName(p,a,b,c)
#else
#define IEaxManager_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IEaxManager_AddRef(p) (p)->AddRef()
#define IEaxManager_Release(p) (p)->Release()
#define IEaxManager_GetDataSetSize(p,a,b) (p)->GetDataSetSize(a,b)
#define IEaxManager_LoadDataSet(p,a,b) (p)->LoadDataSet(a,b)
#define IEaxManager_FreeDataSet(p,a) (p)->FreeDataSet(a)
#define IEaxManager_GetListenerAttributes(p,a) (p)->GetListenerAttributes(a)
#define IEaxManager_GetSourceID(p,a,b) (p)->GetSourceID(a,b)
#define IEaxManager_GetSourceAttributes(p,a,b) (p)->GetSourceAttributes(a,b)
#define IEaxManager_GetSourceNumInstances(p,a,b) (p)->GetSourceNumInstances(a,b)
#define IEaxManager_GetSourceInstancePos(p,a,b,c) (p)->GetSourceInstancePos(a,b,c)
#define IEaxManager_GetEnvironmentID(p,a,b) (p)->GetEnvironmentID(a,b)
#define IEaxManager_GetEnvironmentAttributes(p,a,b) (p)->GetEnvironmentAttributes(a,b)
#define IEaxManager_GetMaterialID(p,a,b) (p)->GetMaterialID(a,b)
#define IEaxManager_GetMaterialAttributes(p,a,b) (p)->GetMaterialAttributes(a,b)
#define IEaxManager_GetGeometrySetID(p,a,b) (p)->GetGeometrySetID(a,b)
#define IEaxManager_GetListenerDynamicAttributes(p,a,b,c,d) (p)->GetListenerDynamicAttributes(a,b,c,d)
#define IEaxManager_GetSourceDynamicAttributes(p,a,b,c,d,e,f,g,h,i) (p)->GetSourceDynamicAttributes(a,b,c,d,e,f,g,h,i)
//#define IEaxManager_GetSubSpaceID(p,a,b,c) (p)->GetSubSpaceID(a,b,c)
#define IEaxManager_GetEnvironmentName(p,a,b,c) (p)->GetEnvironmentName(a,b,c)
#endif
#define EM_OK 0
#define EM_INVALIDID MAKE_HRESULT(1, FACILITY_ITF, 1)
#define EM_IDNOTFOUND MAKE_HRESULT(1, FACILITY_ITF, 2)
#define EM_FILENOTFOUND MAKE_HRESULT(1, FACILITY_ITF, 3)
#define EM_FILEINVALID MAKE_HRESULT(1, FACILITY_ITF, 4)
#define EM_VERSIONINVALID MAKE_HRESULT(1, FACILITY_ITF, 5)
#define EM_INSTANCENOTFOUND MAKE_HRESULT(1, FACILITY_ITF, 6)
#ifdef __cplusplus
};
#endif // __cplusplus
#endif

View File

@@ -0,0 +1,61 @@
/*
*/
#ifndef __EFXLIBH
#define __EFXLIBH
#include "eax4.h"
///////////////////////////////////////////////////////////
// Class definitions.
class idSoundEffect
{
public:
idSoundEffect() {
};
~idSoundEffect() {
if ( data && datasize ) {
Mem_Free( data );
data = NULL;
}
}
idStr name;
int datasize;
void *data;
};
class idEFXFile
{
private:
protected:
// Protected data members.
public:
// Public data members.
private:
public:
idEFXFile();
~idEFXFile();
bool FindEffect( idStr &name, idSoundEffect **effect, int *index );
bool ReadEffect( idLexer &lexer, idSoundEffect *effect );
bool LoadFile( const char *filename, bool OSPath = false );
void UnloadFile( void );
void Clear( void );
idList<idSoundEffect *>effects;
};
///////////////////////////////////////////////////////////
#endif // __EFXLIBH