mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
this commit is also broken
git-svn-id: https://svn.eduke32.com/eduke32@1469 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
68e35cb442
commit
f80a415898
17 changed files with 47 additions and 2337 deletions
|
@ -1,732 +0,0 @@
|
||||||
#ifndef AL_AL_H
|
|
||||||
#define AL_AL_H
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(_XBOX)
|
|
||||||
/* _OPENAL32LIB is deprecated */
|
|
||||||
#if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB)
|
|
||||||
#define AL_API __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define AL_API __declspec(dllimport)
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define AL_API extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
|
||||||
#define AL_APIENTRY __cdecl
|
|
||||||
#else
|
|
||||||
#define AL_APIENTRY
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if TARGET_OS_MAC
|
|
||||||
#pragma export on
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The OPENAL, ALAPI, and ALAPIENTRY macros are deprecated, but are included for applications porting code
|
|
||||||
from AL 1.0 */
|
|
||||||
#define OPENAL
|
|
||||||
#define ALAPI AL_API
|
|
||||||
#define ALAPIENTRY AL_APIENTRY
|
|
||||||
|
|
||||||
#define AL_VERSION_1_0
|
|
||||||
#define AL_VERSION_1_1
|
|
||||||
|
|
||||||
|
|
||||||
/** 8-bit boolean */
|
|
||||||
typedef char ALboolean;
|
|
||||||
|
|
||||||
/** character */
|
|
||||||
typedef char ALchar;
|
|
||||||
|
|
||||||
/** signed 8-bit 2's complement integer */
|
|
||||||
typedef char ALbyte;
|
|
||||||
|
|
||||||
/** unsigned 8-bit integer */
|
|
||||||
typedef unsigned char ALubyte;
|
|
||||||
|
|
||||||
/** signed 16-bit 2's complement integer */
|
|
||||||
typedef short ALshort;
|
|
||||||
|
|
||||||
/** unsigned 16-bit integer */
|
|
||||||
typedef unsigned short ALushort;
|
|
||||||
|
|
||||||
/** signed 32-bit 2's complement integer */
|
|
||||||
typedef int ALint;
|
|
||||||
|
|
||||||
/** unsigned 32-bit integer */
|
|
||||||
typedef unsigned int ALuint;
|
|
||||||
|
|
||||||
/** non-negative 32-bit binary integer size */
|
|
||||||
typedef unsigned ALsizei;
|
|
||||||
|
|
||||||
/** enumerated 32-bit value */
|
|
||||||
typedef int ALenum;
|
|
||||||
|
|
||||||
/** 32-bit IEEE754 floating-point */
|
|
||||||
typedef float ALfloat;
|
|
||||||
|
|
||||||
/** 64-bit IEEE754 floating-point */
|
|
||||||
typedef double ALdouble;
|
|
||||||
|
|
||||||
/** void type (for opaque pointers only) */
|
|
||||||
typedef void ALvoid;
|
|
||||||
|
|
||||||
|
|
||||||
/* Enumerant values begin at column 50. No tabs. */
|
|
||||||
|
|
||||||
/* bad value */
|
|
||||||
#define AL_INVALID -1
|
|
||||||
|
|
||||||
#define AL_NONE 0
|
|
||||||
|
|
||||||
/* Boolean False. */
|
|
||||||
#define AL_FALSE 0
|
|
||||||
|
|
||||||
/** Boolean True. */
|
|
||||||
#define AL_TRUE 1
|
|
||||||
|
|
||||||
/** Indicate Source has 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. */
|
|
||||||
#define AL_DIRECTION 0x1005
|
|
||||||
|
|
||||||
/** Specify the current velocity in three dimensional space. */
|
|
||||||
#define AL_VELOCITY 0x1006
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicate whether source is looping.
|
|
||||||
* Type: ALboolean?
|
|
||||||
* Range: [AL_TRUE, AL_FALSE]
|
|
||||||
* Default: 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]
|
|
||||||
*
|
|
||||||
* Logarthmic
|
|
||||||
*/
|
|
||||||
#define AL_MIN_GAIN 0x100D
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicate maximum source attenuation
|
|
||||||
* Type: ALfloat
|
|
||||||
* Range: [0.0 - 1.0]
|
|
||||||
*
|
|
||||||
* Logarthmic
|
|
||||||
*/
|
|
||||||
#define AL_MAX_GAIN 0x100E
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicate listener orientation.
|
|
||||||
*
|
|
||||||
* at/up
|
|
||||||
*/
|
|
||||||
#define AL_ORIENTATION 0x100F
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Source buffer position information
|
|
||||||
*/
|
|
||||||
#define AL_SEC_OFFSET 0x1024
|
|
||||||
#define AL_SAMPLE_OFFSET 0x1025
|
|
||||||
#define AL_BYTE_OFFSET 0x1026
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Source type (Static, Streaming or undetermined)
|
|
||||||
* Source is Static if a Buffer has been attached using AL_BUFFER
|
|
||||||
* Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
|
|
||||||
* Source is undetermined when it has the NULL buffer attached
|
|
||||||
*/
|
|
||||||
#define AL_SOURCE_TYPE 0x1027
|
|
||||||
#define AL_STATIC 0x1028
|
|
||||||
#define AL_STREAMING 0x1029
|
|
||||||
#define AL_UNDETERMINED 0x1030
|
|
||||||
|
|
||||||
/** Sound samples: format specifier. */
|
|
||||||
#define AL_FORMAT_MONO8 0x1100
|
|
||||||
#define AL_FORMAT_MONO16 0x1101
|
|
||||||
#define AL_FORMAT_STEREO8 0x1102
|
|
||||||
#define AL_FORMAT_STEREO16 0x1103
|
|
||||||
|
|
||||||
/**
|
|
||||||
* source specific reference distance
|
|
||||||
* Type: ALfloat
|
|
||||||
* Range: 0.0 - +inf
|
|
||||||
*
|
|
||||||
* At 0.0, no distance attenuation occurs. Default is
|
|
||||||
* 1.0.
|
|
||||||
*/
|
|
||||||
#define AL_REFERENCE_DISTANCE 0x1020
|
|
||||||
|
|
||||||
/**
|
|
||||||
* source specific rolloff factor
|
|
||||||
* Type: ALfloat
|
|
||||||
* Range: 0.0 - +inf
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#define AL_ROLLOFF_FACTOR 0x1021
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Directional source, outer cone gain.
|
|
||||||
*
|
|
||||||
* Default: 0.0
|
|
||||||
* Range: [0.0 - 1.0]
|
|
||||||
* Logarithmic
|
|
||||||
*/
|
|
||||||
#define AL_CONE_OUTER_GAIN 0x1022
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicate distance above which sources are not
|
|
||||||
* attenuated using the inverse clamped distance model.
|
|
||||||
*
|
|
||||||
* Default: +inf
|
|
||||||
* Type: ALfloat
|
|
||||||
* Range: 0.0 - +inf
|
|
||||||
*/
|
|
||||||
#define AL_MAX_DISTANCE 0x1023
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sound samples: 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
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invalid Name paramater passed to AL call.
|
|
||||||
*/
|
|
||||||
#define AL_INVALID_NAME 0xA001
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invalid parameter passed to AL call.
|
|
||||||
*/
|
|
||||||
#define AL_ILLEGAL_ENUM 0xA002
|
|
||||||
#define AL_INVALID_ENUM 0xA002
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invalid enum parameter value.
|
|
||||||
*/
|
|
||||||
#define AL_INVALID_VALUE 0xA003
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Illegal call.
|
|
||||||
*/
|
|
||||||
#define AL_ILLEGAL_COMMAND 0xA004
|
|
||||||
#define AL_INVALID_OPERATION 0xA004
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* No mojo.
|
|
||||||
*/
|
|
||||||
#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
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tweaks speed of propagation.
|
|
||||||
*/
|
|
||||||
#define AL_DOPPLER_VELOCITY 0xC001
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Speed of Sound in units per second
|
|
||||||
*/
|
|
||||||
#define AL_SPEED_OF_SOUND 0xC003
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Distance models
|
|
||||||
*
|
|
||||||
* used in conjunction with DistanceModel
|
|
||||||
*
|
|
||||||
* implicit: NONE, which disances distance attenuation.
|
|
||||||
*/
|
|
||||||
#define AL_DISTANCE_MODEL 0xD000
|
|
||||||
#define AL_INVERSE_DISTANCE 0xD001
|
|
||||||
#define AL_INVERSE_DISTANCE_CLAMPED 0xD002
|
|
||||||
#define AL_LINEAR_DISTANCE 0xD003
|
|
||||||
#define AL_LINEAR_DISTANCE_CLAMPED 0xD004
|
|
||||||
#define AL_EXPONENT_DISTANCE 0xD005
|
|
||||||
#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined(AL_NO_PROTOTYPES)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Renderer State management
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alEnable( ALenum capability );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alDisable( ALenum capability );
|
|
||||||
|
|
||||||
AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* State retrieval
|
|
||||||
*/
|
|
||||||
AL_API const ALchar* AL_APIENTRY alGetString( ALenum param );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data );
|
|
||||||
|
|
||||||
AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param );
|
|
||||||
|
|
||||||
AL_API ALint AL_APIENTRY alGetInteger( ALenum param );
|
|
||||||
|
|
||||||
AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param );
|
|
||||||
|
|
||||||
AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Error support.
|
|
||||||
* Obtain the most recent error generated in the AL state machine.
|
|
||||||
*/
|
|
||||||
AL_API ALenum AL_APIENTRY alGetError( void );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Extension support.
|
|
||||||
* Query for the presence of an extension, and obtain any appropriate
|
|
||||||
* function pointers and enum values.
|
|
||||||
*/
|
|
||||||
AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname );
|
|
||||||
|
|
||||||
AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname );
|
|
||||||
|
|
||||||
AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* LISTENER
|
|
||||||
* Listener represents the location and orientation of the
|
|
||||||
* 'user' in 3D-space.
|
|
||||||
*
|
|
||||||
* Properties include: -
|
|
||||||
*
|
|
||||||
* Gain AL_GAIN ALfloat
|
|
||||||
* Position AL_POSITION ALfloat[3]
|
|
||||||
* Velocity AL_VELOCITY ALfloat[3]
|
|
||||||
* Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set Listener parameters
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get Listener parameters
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values );
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SOURCE
|
|
||||||
* Sources represent individual sound objects in 3D-space.
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* Properties include: -
|
|
||||||
*
|
|
||||||
* Gain AL_GAIN ALfloat
|
|
||||||
* Min Gain AL_MIN_GAIN ALfloat
|
|
||||||
* Max Gain AL_MAX_GAIN ALfloat
|
|
||||||
* Position AL_POSITION ALfloat[3]
|
|
||||||
* Velocity AL_VELOCITY ALfloat[3]
|
|
||||||
* Direction AL_DIRECTION ALfloat[3]
|
|
||||||
* Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE)
|
|
||||||
* Reference Distance AL_REFERENCE_DISTANCE ALfloat
|
|
||||||
* Max Distance AL_MAX_DISTANCE ALfloat
|
|
||||||
* RollOff Factor AL_ROLLOFF_FACTOR ALfloat
|
|
||||||
* Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat
|
|
||||||
* Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat
|
|
||||||
* Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat
|
|
||||||
* Pitch AL_PITCH ALfloat
|
|
||||||
* Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE)
|
|
||||||
* MS Offset AL_MSEC_OFFSET ALint or ALfloat
|
|
||||||
* Byte Offset AL_BYTE_OFFSET ALint or ALfloat
|
|
||||||
* Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat
|
|
||||||
* Attached Buffer AL_BUFFER ALint
|
|
||||||
* State (Query only) AL_SOURCE_STATE ALint
|
|
||||||
* Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint
|
|
||||||
* Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Create Source objects */
|
|
||||||
AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources );
|
|
||||||
|
|
||||||
/* Delete Source objects */
|
|
||||||
AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources );
|
|
||||||
|
|
||||||
/* Verify a handle is a valid Source */
|
|
||||||
AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set Source parameters
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get Source parameters
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Source vector based playback calls
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Play, replay, or resume (if paused) a list of Sources */
|
|
||||||
AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids );
|
|
||||||
|
|
||||||
/* Stop a list of Sources */
|
|
||||||
AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids );
|
|
||||||
|
|
||||||
/* Rewind a list of Sources */
|
|
||||||
AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids );
|
|
||||||
|
|
||||||
/* Pause a list of Sources */
|
|
||||||
AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Source based playback calls
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Play, replay, or resume a Source */
|
|
||||||
AL_API void AL_APIENTRY alSourcePlay( ALuint sid );
|
|
||||||
|
|
||||||
/* Stop a Source */
|
|
||||||
AL_API void AL_APIENTRY alSourceStop( ALuint sid );
|
|
||||||
|
|
||||||
/* Rewind a Source (set playback postiton to beginning) */
|
|
||||||
AL_API void AL_APIENTRY alSourceRewind( ALuint sid );
|
|
||||||
|
|
||||||
/* Pause a Source */
|
|
||||||
AL_API void AL_APIENTRY alSourcePause( ALuint sid );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Source Queuing
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BUFFER
|
|
||||||
* Buffer objects are storage space for sample data.
|
|
||||||
* Buffers are referred to by Sources. One Buffer can be used
|
|
||||||
* by multiple Sources.
|
|
||||||
*
|
|
||||||
* Properties include: -
|
|
||||||
*
|
|
||||||
* Frequency (Query only) AL_FREQUENCY ALint
|
|
||||||
* Size (Query only) AL_SIZE ALint
|
|
||||||
* Bits (Query only) AL_BITS ALint
|
|
||||||
* Channels (Query only) AL_CHANNELS ALint
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Create Buffer objects */
|
|
||||||
AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
|
|
||||||
|
|
||||||
/* Delete Buffer objects */
|
|
||||||
AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers );
|
|
||||||
|
|
||||||
/* Verify a handle is a valid Buffer */
|
|
||||||
AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid );
|
|
||||||
|
|
||||||
/* Specify the data to be copied into a buffer */
|
|
||||||
AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set Buffer parameters
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get Buffer parameters
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Global Parameters
|
|
||||||
*/
|
|
||||||
AL_API void AL_APIENTRY alDopplerFactor( ALfloat value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value );
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
|
|
||||||
|
|
||||||
#else /* AL_NO_PROTOTYPES */
|
|
||||||
|
|
||||||
typedef void (AL_APIENTRY *LPALENABLE)( ALenum capability );
|
|
||||||
typedef void (AL_APIENTRY *LPALDISABLE)( ALenum capability );
|
|
||||||
typedef ALboolean (AL_APIENTRY *LPALISENABLED)( ALenum capability );
|
|
||||||
typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)( ALenum param );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data );
|
|
||||||
typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param );
|
|
||||||
typedef ALint (AL_APIENTRY *LPALGETINTEGER)( ALenum param );
|
|
||||||
typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)( ALenum param );
|
|
||||||
typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)( ALenum param );
|
|
||||||
typedef ALenum (AL_APIENTRY *LPALGETERROR)( void );
|
|
||||||
typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname );
|
|
||||||
typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname );
|
|
||||||
typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename );
|
|
||||||
typedef void (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value );
|
|
||||||
typedef void (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value );
|
|
||||||
typedef void (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources );
|
|
||||||
typedef void (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources );
|
|
||||||
typedef ALboolean (AL_APIENTRY *LPALISSOURCE)( ALuint sid );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value);
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value);
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
|
||||||
typedef void (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
|
||||||
typedef void (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids );
|
|
||||||
typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids );
|
|
||||||
typedef void (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers );
|
|
||||||
typedef void (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers );
|
|
||||||
typedef ALboolean (AL_APIENTRY *LPALISBUFFER)( ALuint bid );
|
|
||||||
typedef void (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
|
|
||||||
typedef void (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value);
|
|
||||||
typedef void (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value);
|
|
||||||
typedef void (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
|
||||||
typedef void (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
|
||||||
typedef void (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value );
|
|
||||||
typedef void (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
|
||||||
typedef void (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values );
|
|
||||||
typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value );
|
|
||||||
typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value );
|
|
||||||
typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value );
|
|
||||||
typedef void (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel );
|
|
||||||
|
|
||||||
#endif /* AL_NO_PROTOTYPES */
|
|
||||||
|
|
||||||
#if TARGET_OS_MAC
|
|
||||||
#pragma export off
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* AL_AL_H */
|
|
|
@ -1,273 +0,0 @@
|
||||||
#ifndef AL_ALC_H
|
|
||||||
#define AL_ALC_H
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(_XBOX)
|
|
||||||
/* _OPENAL32LIB is deprecated */
|
|
||||||
#if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB)
|
|
||||||
#define ALC_API __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define ALC_API __declspec(dllimport)
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define ALC_API extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
|
||||||
#define ALC_APIENTRY __cdecl
|
|
||||||
#else
|
|
||||||
#define ALC_APIENTRY
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if TARGET_OS_MAC
|
|
||||||
#pragma export on
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The ALCAPI, and ALCAPIENTRY macros are deprecated, but are included for applications porting code
|
|
||||||
from AL 1.0 */
|
|
||||||
#define ALCAPI ALC_API
|
|
||||||
#define ALCAPIENTRY ALC_APIENTRY
|
|
||||||
|
|
||||||
#define ALC_VERSION_0_1 1
|
|
||||||
|
|
||||||
typedef struct ALCdevice_struct ALCdevice;
|
|
||||||
typedef struct ALCcontext_struct ALCcontext;
|
|
||||||
|
|
||||||
|
|
||||||
/** 8-bit boolean */
|
|
||||||
typedef char ALCboolean;
|
|
||||||
|
|
||||||
/** character */
|
|
||||||
typedef char ALCchar;
|
|
||||||
|
|
||||||
/** signed 8-bit 2's complement integer */
|
|
||||||
typedef char ALCbyte;
|
|
||||||
|
|
||||||
/** unsigned 8-bit integer */
|
|
||||||
typedef unsigned char ALCubyte;
|
|
||||||
|
|
||||||
/** signed 16-bit 2's complement integer */
|
|
||||||
typedef short ALCshort;
|
|
||||||
|
|
||||||
/** unsigned 16-bit integer */
|
|
||||||
typedef unsigned short ALCushort;
|
|
||||||
|
|
||||||
/** signed 32-bit 2's complement integer */
|
|
||||||
typedef int ALCint;
|
|
||||||
|
|
||||||
/** unsigned 32-bit integer */
|
|
||||||
typedef unsigned int ALCuint;
|
|
||||||
|
|
||||||
/** non-negative 32-bit binary integer size */
|
|
||||||
typedef int ALCsizei;
|
|
||||||
|
|
||||||
/** enumerated 32-bit value */
|
|
||||||
typedef int ALCenum;
|
|
||||||
|
|
||||||
/** 32-bit IEEE754 floating-point */
|
|
||||||
typedef float ALCfloat;
|
|
||||||
|
|
||||||
/** 64-bit IEEE754 floating-point */
|
|
||||||
typedef double ALCdouble;
|
|
||||||
|
|
||||||
/** void type (for opaque pointers only) */
|
|
||||||
typedef void ALCvoid;
|
|
||||||
|
|
||||||
|
|
||||||
/* Enumerant values begin at column 50. No tabs. */
|
|
||||||
|
|
||||||
/* bad value */
|
|
||||||
#define ALC_INVALID 0
|
|
||||||
|
|
||||||
/* Boolean False. */
|
|
||||||
#define ALC_FALSE 0
|
|
||||||
|
|
||||||
/* Boolean True. */
|
|
||||||
#define ALC_TRUE 1
|
|
||||||
|
|
||||||
/**
|
|
||||||
* followed by <int> Hz
|
|
||||||
*/
|
|
||||||
#define ALC_FREQUENCY 0x1007
|
|
||||||
|
|
||||||
/**
|
|
||||||
* followed by <int> Hz
|
|
||||||
*/
|
|
||||||
#define ALC_REFRESH 0x1008
|
|
||||||
|
|
||||||
/**
|
|
||||||
* followed by AL_TRUE, AL_FALSE
|
|
||||||
*/
|
|
||||||
#define ALC_SYNC 0x1009
|
|
||||||
|
|
||||||
/**
|
|
||||||
* followed by <int> Num of requested Mono (3D) Sources
|
|
||||||
*/
|
|
||||||
#define ALC_MONO_SOURCES 0x1010
|
|
||||||
|
|
||||||
/**
|
|
||||||
* followed by <int> Num of requested Stereo Sources
|
|
||||||
*/
|
|
||||||
#define ALC_STEREO_SOURCES 0x1011
|
|
||||||
|
|
||||||
/**
|
|
||||||
* errors
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* No error
|
|
||||||
*/
|
|
||||||
#define ALC_NO_ERROR ALC_FALSE
|
|
||||||
|
|
||||||
/**
|
|
||||||
* No device
|
|
||||||
*/
|
|
||||||
#define ALC_INVALID_DEVICE 0xA001
|
|
||||||
|
|
||||||
/**
|
|
||||||
* invalid context ID
|
|
||||||
*/
|
|
||||||
#define ALC_INVALID_CONTEXT 0xA002
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bad enum
|
|
||||||
*/
|
|
||||||
#define ALC_INVALID_ENUM 0xA003
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bad value
|
|
||||||
*/
|
|
||||||
#define ALC_INVALID_VALUE 0xA004
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Out of memory.
|
|
||||||
*/
|
|
||||||
#define ALC_OUT_OF_MEMORY 0xA005
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Specifier string for default device
|
|
||||||
*/
|
|
||||||
#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
|
|
||||||
#define ALC_DEVICE_SPECIFIER 0x1005
|
|
||||||
#define ALC_EXTENSIONS 0x1006
|
|
||||||
|
|
||||||
#define ALC_MAJOR_VERSION 0x1000
|
|
||||||
#define ALC_MINOR_VERSION 0x1001
|
|
||||||
|
|
||||||
#define ALC_ATTRIBUTES_SIZE 0x1002
|
|
||||||
#define ALC_ALL_ATTRIBUTES 0x1003
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Capture extension
|
|
||||||
*/
|
|
||||||
#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
|
|
||||||
#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
|
|
||||||
#define ALC_CAPTURE_SAMPLES 0x312
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined(ALC_NO_PROTOTYPES)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Context Management
|
|
||||||
*/
|
|
||||||
ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );
|
|
||||||
|
|
||||||
ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
|
|
||||||
|
|
||||||
ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context );
|
|
||||||
|
|
||||||
ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context );
|
|
||||||
|
|
||||||
ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );
|
|
||||||
|
|
||||||
ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( ALCvoid );
|
|
||||||
|
|
||||||
ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Device Management
|
|
||||||
*/
|
|
||||||
ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename );
|
|
||||||
|
|
||||||
ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Error support.
|
|
||||||
* Obtain the most recent Context error
|
|
||||||
*/
|
|
||||||
ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Extension support.
|
|
||||||
* Query for the presence of an extension, and obtain any appropriate
|
|
||||||
* function pointers and enum values.
|
|
||||||
*/
|
|
||||||
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );
|
|
||||||
|
|
||||||
ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );
|
|
||||||
|
|
||||||
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Query functions
|
|
||||||
*/
|
|
||||||
ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
|
|
||||||
|
|
||||||
ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Capture functions
|
|
||||||
*/
|
|
||||||
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
|
|
||||||
|
|
||||||
ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device );
|
|
||||||
|
|
||||||
ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device );
|
|
||||||
|
|
||||||
ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device );
|
|
||||||
|
|
||||||
ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
|
|
||||||
|
|
||||||
#else /* ALC_NO_PROTOTYPES */
|
|
||||||
|
|
||||||
typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
|
|
||||||
typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
|
|
||||||
typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
|
|
||||||
typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
|
|
||||||
typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
|
|
||||||
typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( ALCvoid );
|
|
||||||
typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
|
|
||||||
typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
|
|
||||||
typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
|
|
||||||
typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device );
|
|
||||||
typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname );
|
|
||||||
typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname );
|
|
||||||
typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname );
|
|
||||||
typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param );
|
|
||||||
typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
|
|
||||||
typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
|
|
||||||
typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device );
|
|
||||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device );
|
|
||||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );
|
|
||||||
typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
|
|
||||||
|
|
||||||
#endif /* ALC_NO_PROTOTYPES */
|
|
||||||
|
|
||||||
#if TARGET_OS_MAC
|
|
||||||
#pragma export off
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* AL_ALC_H */
|
|
|
@ -1,125 +0,0 @@
|
||||||
#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
|
|
||||||
|
|
|
@ -1,332 +0,0 @@
|
||||||
#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
|
|
|
@ -1,184 +0,0 @@
|
||||||
/********************************************************************
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
||||||
* *
|
|
||||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
|
||||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
|
||||||
* *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
function: toplevel libogg include
|
|
||||||
last mod: $Id: ogg.h,v 1.18 2002/07/13 10:28:33 giles Exp $
|
|
||||||
|
|
||||||
********************************************************************/
|
|
||||||
#ifndef _OGG_H
|
|
||||||
#define _OGG_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ogg/os_types.h>
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long endbyte;
|
|
||||||
int endbit;
|
|
||||||
|
|
||||||
unsigned char *buffer;
|
|
||||||
unsigned char *ptr;
|
|
||||||
long storage;
|
|
||||||
} oggpack_buffer;
|
|
||||||
|
|
||||||
/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned char *header;
|
|
||||||
long header_len;
|
|
||||||
unsigned char *body;
|
|
||||||
long body_len;
|
|
||||||
} ogg_page;
|
|
||||||
|
|
||||||
/* ogg_stream_state contains the current encode/decode state of a logical
|
|
||||||
Ogg bitstream **********************************************************/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned char *body_data; /* bytes from packet bodies */
|
|
||||||
long body_storage; /* storage elements allocated */
|
|
||||||
long body_fill; /* elements stored; fill mark */
|
|
||||||
long body_returned; /* elements of fill returned */
|
|
||||||
|
|
||||||
|
|
||||||
int *lacing_vals; /* The values that will go to the segment table */
|
|
||||||
ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
|
|
||||||
this way, but it is simple coupled to the
|
|
||||||
lacing fifo */
|
|
||||||
long lacing_storage;
|
|
||||||
long lacing_fill;
|
|
||||||
long lacing_packet;
|
|
||||||
long lacing_returned;
|
|
||||||
|
|
||||||
unsigned char header[282]; /* working space for header encode */
|
|
||||||
int header_fill;
|
|
||||||
|
|
||||||
int e_o_s; /* set when we have buffered the last packet in the
|
|
||||||
logical bitstream */
|
|
||||||
int b_o_s; /* set after we've written the initial page
|
|
||||||
of a logical bitstream */
|
|
||||||
long serialno;
|
|
||||||
long pageno;
|
|
||||||
ogg_int64_t packetno; /* sequence number for decode; the framing
|
|
||||||
knows where there's a hole in the data,
|
|
||||||
but we need coupling so that the codec
|
|
||||||
(which is in a seperate abstraction
|
|
||||||
layer) also knows about the gap */
|
|
||||||
ogg_int64_t granulepos;
|
|
||||||
|
|
||||||
} ogg_stream_state;
|
|
||||||
|
|
||||||
/* ogg_packet is used to encapsulate the data and metadata belonging
|
|
||||||
to a single raw Ogg/Vorbis packet *************************************/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned char *packet;
|
|
||||||
long bytes;
|
|
||||||
long b_o_s;
|
|
||||||
long e_o_s;
|
|
||||||
|
|
||||||
ogg_int64_t granulepos;
|
|
||||||
|
|
||||||
ogg_int64_t packetno; /* sequence number for decode; the framing
|
|
||||||
knows where there's a hole in the data,
|
|
||||||
but we need coupling so that the codec
|
|
||||||
(which is in a seperate abstraction
|
|
||||||
layer) also knows about the gap */
|
|
||||||
} ogg_packet;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned char *data;
|
|
||||||
int storage;
|
|
||||||
int fill;
|
|
||||||
int returned;
|
|
||||||
|
|
||||||
int unsynced;
|
|
||||||
int headerbytes;
|
|
||||||
int bodybytes;
|
|
||||||
} ogg_sync_state;
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
|
|
||||||
|
|
||||||
extern void oggpack_writeinit(oggpack_buffer *b);
|
|
||||||
extern void oggpack_writetrunc(oggpack_buffer *b,long bits);
|
|
||||||
extern void oggpack_writealign(oggpack_buffer *b);
|
|
||||||
extern void oggpack_writecopy(oggpack_buffer *b,void *source,long bits);
|
|
||||||
extern void oggpack_reset(oggpack_buffer *b);
|
|
||||||
extern void oggpack_writeclear(oggpack_buffer *b);
|
|
||||||
extern void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
|
|
||||||
extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
|
|
||||||
extern long oggpack_look(oggpack_buffer *b,int bits);
|
|
||||||
extern long oggpack_look1(oggpack_buffer *b);
|
|
||||||
extern void oggpack_adv(oggpack_buffer *b,int bits);
|
|
||||||
extern void oggpack_adv1(oggpack_buffer *b);
|
|
||||||
extern long oggpack_read(oggpack_buffer *b,int bits);
|
|
||||||
extern long oggpack_read1(oggpack_buffer *b);
|
|
||||||
extern long oggpack_bytes(oggpack_buffer *b);
|
|
||||||
extern long oggpack_bits(oggpack_buffer *b);
|
|
||||||
extern unsigned char *oggpack_get_buffer(oggpack_buffer *b);
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: encoding **************************/
|
|
||||||
|
|
||||||
extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
|
|
||||||
extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
|
|
||||||
extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og);
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
|
|
||||||
|
|
||||||
extern int ogg_sync_init(ogg_sync_state *oy);
|
|
||||||
extern int ogg_sync_clear(ogg_sync_state *oy);
|
|
||||||
extern int ogg_sync_reset(ogg_sync_state *oy);
|
|
||||||
extern int ogg_sync_destroy(ogg_sync_state *oy);
|
|
||||||
|
|
||||||
extern char *ogg_sync_buffer(ogg_sync_state *oy, long size);
|
|
||||||
extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes);
|
|
||||||
extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
|
|
||||||
extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
|
|
||||||
extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
|
|
||||||
extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
|
|
||||||
extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: general ***************************/
|
|
||||||
|
|
||||||
extern int ogg_stream_init(ogg_stream_state *os,int serialno);
|
|
||||||
extern int ogg_stream_clear(ogg_stream_state *os);
|
|
||||||
extern int ogg_stream_reset(ogg_stream_state *os);
|
|
||||||
extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
|
|
||||||
extern int ogg_stream_destroy(ogg_stream_state *os);
|
|
||||||
extern int ogg_stream_eos(ogg_stream_state *os);
|
|
||||||
|
|
||||||
extern void ogg_page_checksum_set(ogg_page *og);
|
|
||||||
|
|
||||||
extern int ogg_page_version(ogg_page *og);
|
|
||||||
extern int ogg_page_continued(ogg_page *og);
|
|
||||||
extern int ogg_page_bos(ogg_page *og);
|
|
||||||
extern int ogg_page_eos(ogg_page *og);
|
|
||||||
extern ogg_int64_t ogg_page_granulepos(ogg_page *og);
|
|
||||||
extern int ogg_page_serialno(ogg_page *og);
|
|
||||||
extern long ogg_page_pageno(ogg_page *og);
|
|
||||||
extern int ogg_page_packets(ogg_page *og);
|
|
||||||
|
|
||||||
extern void ogg_packet_clear(ogg_packet *op);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _OGG_H */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,89 +0,0 @@
|
||||||
/********************************************************************
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
||||||
* *
|
|
||||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
|
||||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
|
||||||
* *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
|
||||||
last mod: $Id: os_types.h,v 1.11 2002/07/19 08:25:51 msmith Exp $
|
|
||||||
|
|
||||||
********************************************************************/
|
|
||||||
#ifndef _OS_TYPES_H
|
|
||||||
#define _OS_TYPES_H
|
|
||||||
|
|
||||||
/* make it easy on the folks that want to compile the libs with a
|
|
||||||
different malloc than stdlib */
|
|
||||||
#define _ogg_malloc malloc
|
|
||||||
#define _ogg_calloc calloc
|
|
||||||
#define _ogg_realloc realloc
|
|
||||||
#define _ogg_free free
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
# ifndef __GNUC__
|
|
||||||
/* MSVC/Borland */
|
|
||||||
typedef __int64 ogg_int64_t;
|
|
||||||
typedef __int32 ogg_int32_t;
|
|
||||||
typedef unsigned __int32 ogg_uint32_t;
|
|
||||||
typedef __int16 ogg_int16_t;
|
|
||||||
# else
|
|
||||||
/* Cygwin */
|
|
||||||
/* #include <_G_config.h>
|
|
||||||
typedef _G_int64_t ogg_int64_t;
|
|
||||||
typedef _G_int32_t ogg_int32_t;
|
|
||||||
typedef _G_uint32_t ogg_uint32_t;
|
|
||||||
typedef _G_int16_t ogg_int16_t;*/
|
|
||||||
typedef long long ogg_int64_t;
|
|
||||||
/* typedef signed int ogg_int32_t;
|
|
||||||
typedef unsigned int ogg_uint32_t;
|
|
||||||
typedef signed short ogg_int16_t;*/
|
|
||||||
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#elif defined(__MACOS__)
|
|
||||||
|
|
||||||
# include <sys/types.h>
|
|
||||||
typedef SInt16 ogg_int16_t;
|
|
||||||
typedef SInt32 ogg_int32_t;
|
|
||||||
typedef UInt32 ogg_uint32_t;
|
|
||||||
typedef SInt64 ogg_int64_t;
|
|
||||||
|
|
||||||
#elif defined(__MACOSX__) /* MacOS X Framework build */
|
|
||||||
|
|
||||||
# include <sys/types.h>
|
|
||||||
typedef int16_t ogg_int16_t;
|
|
||||||
typedef int32_t ogg_int32_t;
|
|
||||||
typedef u_int32_t ogg_uint32_t;
|
|
||||||
typedef int64_t ogg_int64_t;
|
|
||||||
|
|
||||||
#elif defined(__BEOS__)
|
|
||||||
|
|
||||||
/* Be */
|
|
||||||
# include <inttypes.h>
|
|
||||||
typedef int16_t ogg_int16_t;
|
|
||||||
typedef int32_t ogg_int32_t;
|
|
||||||
typedef u_int32_t ogg_uint32_t;
|
|
||||||
typedef int64_t ogg_int64_t;
|
|
||||||
|
|
||||||
#elif defined (__EMX__)
|
|
||||||
|
|
||||||
/* OS/2 GCC */
|
|
||||||
typedef short ogg_int16_t;
|
|
||||||
typedef int ogg_int32_t;
|
|
||||||
typedef unsigned int ogg_uint32_t;
|
|
||||||
typedef long long ogg_int64_t;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
# include <sys/types.h>
|
|
||||||
# include <ogg/config_types.h>
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _OS_TYPES_H */
|
|
|
@ -1,233 +0,0 @@
|
||||||
/********************************************************************
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
||||||
* *
|
|
||||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
|
|
||||||
* by the XIPHOPHORUS Company http://www.xiph.org/ *
|
|
||||||
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
function: libvorbis codec headers
|
|
||||||
last mod: $Id: codec.h,v 1.40 2002/02/28 04:12:47 xiphmont Exp $
|
|
||||||
|
|
||||||
********************************************************************/
|
|
||||||
|
|
||||||
#ifndef _vorbis_codec_h_
|
|
||||||
#define _vorbis_codec_h_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#include <ogg/ogg.h>
|
|
||||||
|
|
||||||
typedef struct vorbis_info{
|
|
||||||
int version;
|
|
||||||
int channels;
|
|
||||||
long rate;
|
|
||||||
|
|
||||||
/* The below bitrate declarations are *hints*.
|
|
||||||
Combinations of the three values carry the following implications:
|
|
||||||
|
|
||||||
all three set to the same value:
|
|
||||||
implies a fixed rate bitstream
|
|
||||||
only nominal set:
|
|
||||||
implies a VBR stream that averages the nominal bitrate. No hard
|
|
||||||
upper/lower limit
|
|
||||||
upper and or lower set:
|
|
||||||
implies a VBR bitstream that obeys the bitrate limits. nominal
|
|
||||||
may also be set to give a nominal rate.
|
|
||||||
none set:
|
|
||||||
the coder does not care to speculate.
|
|
||||||
*/
|
|
||||||
|
|
||||||
long bitrate_upper;
|
|
||||||
long bitrate_nominal;
|
|
||||||
long bitrate_lower;
|
|
||||||
long bitrate_window;
|
|
||||||
|
|
||||||
void *codec_setup;
|
|
||||||
} vorbis_info;
|
|
||||||
|
|
||||||
/* vorbis_dsp_state buffers the current vorbis audio
|
|
||||||
analysis/synthesis state. The DSP state belongs to a specific
|
|
||||||
logical bitstream ****************************************************/
|
|
||||||
typedef struct vorbis_dsp_state{
|
|
||||||
int analysisp;
|
|
||||||
vorbis_info *vi;
|
|
||||||
|
|
||||||
float **pcm;
|
|
||||||
float **pcmret;
|
|
||||||
int pcm_storage;
|
|
||||||
int pcm_current;
|
|
||||||
int pcm_returned;
|
|
||||||
|
|
||||||
int preextrapolate;
|
|
||||||
int eofflag;
|
|
||||||
|
|
||||||
long lW;
|
|
||||||
long W;
|
|
||||||
long nW;
|
|
||||||
long centerW;
|
|
||||||
|
|
||||||
ogg_int64_t granulepos;
|
|
||||||
ogg_int64_t sequence;
|
|
||||||
|
|
||||||
ogg_int64_t glue_bits;
|
|
||||||
ogg_int64_t time_bits;
|
|
||||||
ogg_int64_t floor_bits;
|
|
||||||
ogg_int64_t res_bits;
|
|
||||||
|
|
||||||
void *backend_state;
|
|
||||||
} vorbis_dsp_state;
|
|
||||||
|
|
||||||
typedef struct vorbis_block{
|
|
||||||
/* necessary stream state for linking to the framing abstraction */
|
|
||||||
float **pcm; /* this is a pointer into local storage */
|
|
||||||
oggpack_buffer opb;
|
|
||||||
|
|
||||||
long lW;
|
|
||||||
long W;
|
|
||||||
long nW;
|
|
||||||
int pcmend;
|
|
||||||
int mode;
|
|
||||||
|
|
||||||
int eofflag;
|
|
||||||
ogg_int64_t granulepos;
|
|
||||||
ogg_int64_t sequence;
|
|
||||||
vorbis_dsp_state *vd; /* For read-only access of configuration */
|
|
||||||
|
|
||||||
/* local storage to avoid remallocing; it's up to the mapping to
|
|
||||||
structure it */
|
|
||||||
void *localstore;
|
|
||||||
long localtop;
|
|
||||||
long localalloc;
|
|
||||||
long totaluse;
|
|
||||||
struct alloc_chain *reap;
|
|
||||||
|
|
||||||
/* bitmetrics for the frame */
|
|
||||||
long glue_bits;
|
|
||||||
long time_bits;
|
|
||||||
long floor_bits;
|
|
||||||
long res_bits;
|
|
||||||
|
|
||||||
void *internal;
|
|
||||||
|
|
||||||
} vorbis_block;
|
|
||||||
|
|
||||||
/* vorbis_block is a single block of data to be processed as part of
|
|
||||||
the analysis/synthesis stream; it belongs to a specific logical
|
|
||||||
bitstream, but is independant from other vorbis_blocks belonging to
|
|
||||||
that logical bitstream. *************************************************/
|
|
||||||
|
|
||||||
struct alloc_chain{
|
|
||||||
void *ptr;
|
|
||||||
struct alloc_chain *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* vorbis_info contains all the setup information specific to the
|
|
||||||
specific compression/decompression mode in progress (eg,
|
|
||||||
psychoacoustic settings, channel setup, options, codebook
|
|
||||||
etc). vorbis_info and substructures are in backends.h.
|
|
||||||
*********************************************************************/
|
|
||||||
|
|
||||||
/* the comments are not part of vorbis_info so that vorbis_info can be
|
|
||||||
static storage */
|
|
||||||
typedef struct vorbis_comment{
|
|
||||||
/* unlimited user comment fields. libvorbis writes 'libvorbis'
|
|
||||||
whatever vendor is set to in encode */
|
|
||||||
char **user_comments;
|
|
||||||
int *comment_lengths;
|
|
||||||
int comments;
|
|
||||||
char *vendor;
|
|
||||||
|
|
||||||
} vorbis_comment;
|
|
||||||
|
|
||||||
|
|
||||||
/* libvorbis encodes in two abstraction layers; first we perform DSP
|
|
||||||
and produce a packet (see docs/analysis.txt). The packet is then
|
|
||||||
coded into a framed OggSquish bitstream by the second layer (see
|
|
||||||
docs/framing.txt). Decode is the reverse process; we sync/frame
|
|
||||||
the bitstream and extract individual packets, then decode the
|
|
||||||
packet back into PCM audio.
|
|
||||||
|
|
||||||
The extra framing/packetizing is used in streaming formats, such as
|
|
||||||
files. Over the net (such as with UDP), the framing and
|
|
||||||
packetization aren't necessary as they're provided by the transport
|
|
||||||
and the streaming layer is not used */
|
|
||||||
|
|
||||||
/* Vorbis PRIMITIVES: general ***************************************/
|
|
||||||
|
|
||||||
extern void vorbis_info_init(vorbis_info *vi);
|
|
||||||
extern void vorbis_info_clear(vorbis_info *vi);
|
|
||||||
extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
|
|
||||||
extern void vorbis_comment_init(vorbis_comment *vc);
|
|
||||||
extern void vorbis_comment_add(vorbis_comment *vc, char *comment);
|
|
||||||
extern void vorbis_comment_add_tag(vorbis_comment *vc,
|
|
||||||
char *tag, char *contents);
|
|
||||||
extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
|
|
||||||
extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag);
|
|
||||||
extern void vorbis_comment_clear(vorbis_comment *vc);
|
|
||||||
|
|
||||||
extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
|
|
||||||
extern int vorbis_block_clear(vorbis_block *vb);
|
|
||||||
extern void vorbis_dsp_clear(vorbis_dsp_state *v);
|
|
||||||
|
|
||||||
/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
|
|
||||||
|
|
||||||
extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
|
|
||||||
extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
|
|
||||||
extern int vorbis_analysis_headerout(vorbis_dsp_state *v,
|
|
||||||
vorbis_comment *vc,
|
|
||||||
ogg_packet *op,
|
|
||||||
ogg_packet *op_comm,
|
|
||||||
ogg_packet *op_code);
|
|
||||||
extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
|
|
||||||
extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
|
|
||||||
extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
|
|
||||||
extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op);
|
|
||||||
|
|
||||||
extern int vorbis_bitrate_addblock(vorbis_block *vb);
|
|
||||||
extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
|
|
||||||
ogg_packet *op);
|
|
||||||
|
|
||||||
/* Vorbis PRIMITIVES: synthesis layer *******************************/
|
|
||||||
extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
|
|
||||||
ogg_packet *op);
|
|
||||||
|
|
||||||
extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
|
|
||||||
extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
|
|
||||||
extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
|
|
||||||
extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
|
|
||||||
extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm);
|
|
||||||
extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
|
|
||||||
extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
|
|
||||||
|
|
||||||
/* Vorbis ERRORS and return codes ***********************************/
|
|
||||||
|
|
||||||
#define OV_FALSE -1
|
|
||||||
#define OV_EOF -2
|
|
||||||
#define OV_HOLE -3
|
|
||||||
|
|
||||||
#define OV_EREAD -128
|
|
||||||
#define OV_EFAULT -129
|
|
||||||
#define OV_EIMPL -130
|
|
||||||
#define OV_EINVAL -131
|
|
||||||
#define OV_ENOTVORBIS -132
|
|
||||||
#define OV_EBADHEADER -133
|
|
||||||
#define OV_EVERSION -134
|
|
||||||
#define OV_ENOTAUDIO -135
|
|
||||||
#define OV_EBADPACKET -136
|
|
||||||
#define OV_EBADLINK -137
|
|
||||||
#define OV_ENOSEEK -138
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,93 +0,0 @@
|
||||||
/********************************************************************
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
||||||
* *
|
|
||||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
|
|
||||||
* by the XIPHOPHORUS Company http://www.xiph.org/ *
|
|
||||||
* *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
function: vorbis encode-engine setup
|
|
||||||
last mod: $Id: vorbisenc.h,v 1.10 2002/07/01 11:20:10 xiphmont Exp $
|
|
||||||
|
|
||||||
********************************************************************/
|
|
||||||
|
|
||||||
#ifndef _OV_ENC_H_
|
|
||||||
#define _OV_ENC_H_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#include "codec.h"
|
|
||||||
|
|
||||||
extern int vorbis_encode_init(vorbis_info *vi,
|
|
||||||
long channels,
|
|
||||||
long rate,
|
|
||||||
|
|
||||||
long max_bitrate,
|
|
||||||
long nominal_bitrate,
|
|
||||||
long min_bitrate);
|
|
||||||
|
|
||||||
extern int vorbis_encode_setup_managed(vorbis_info *vi,
|
|
||||||
long channels,
|
|
||||||
long rate,
|
|
||||||
|
|
||||||
long max_bitrate,
|
|
||||||
long nominal_bitrate,
|
|
||||||
long min_bitrate);
|
|
||||||
|
|
||||||
extern int vorbis_encode_setup_vbr(vorbis_info *vi,
|
|
||||||
long channels,
|
|
||||||
long rate,
|
|
||||||
|
|
||||||
float /* quality level from 0. (lo) to 1. (hi) */
|
|
||||||
);
|
|
||||||
|
|
||||||
extern int vorbis_encode_init_vbr(vorbis_info *vi,
|
|
||||||
long channels,
|
|
||||||
long rate,
|
|
||||||
|
|
||||||
float base_quality /* quality level from 0. (lo) to 1. (hi) */
|
|
||||||
);
|
|
||||||
|
|
||||||
extern int vorbis_encode_setup_init(vorbis_info *vi);
|
|
||||||
|
|
||||||
extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg);
|
|
||||||
|
|
||||||
#define OV_ECTL_RATEMANAGE_GET 0x10
|
|
||||||
|
|
||||||
#define OV_ECTL_RATEMANAGE_SET 0x11
|
|
||||||
#define OV_ECTL_RATEMANAGE_AVG 0x12
|
|
||||||
#define OV_ECTL_RATEMANAGE_HARD 0x13
|
|
||||||
|
|
||||||
#define OV_ECTL_LOWPASS_GET 0x20
|
|
||||||
#define OV_ECTL_LOWPASS_SET 0x21
|
|
||||||
|
|
||||||
#define OV_ECTL_IBLOCK_GET 0x30
|
|
||||||
#define OV_ECTL_IBLOCK_SET 0x31
|
|
||||||
|
|
||||||
struct ovectl_ratemanage_arg {
|
|
||||||
int management_active;
|
|
||||||
|
|
||||||
long bitrate_hard_min;
|
|
||||||
long bitrate_hard_max;
|
|
||||||
double bitrate_hard_window;
|
|
||||||
|
|
||||||
long bitrate_av_lo;
|
|
||||||
long bitrate_av_hi;
|
|
||||||
double bitrate_av_window;
|
|
||||||
double bitrate_av_window_center;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
|
@ -1,133 +0,0 @@
|
||||||
/********************************************************************
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
||||||
* *
|
|
||||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
|
|
||||||
* by the XIPHOPHORUS Company http://www.xiph.org/ *
|
|
||||||
* *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
function: stdio-based convenience library for opening/seeking/decoding
|
|
||||||
last mod: $Id: vorbisfile.h,v 1.17 2002/03/07 03:41:03 xiphmont Exp $
|
|
||||||
|
|
||||||
********************************************************************/
|
|
||||||
|
|
||||||
#ifndef _OV_FILE_H_
|
|
||||||
#define _OV_FILE_H_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "codec.h"
|
|
||||||
|
|
||||||
/* The function prototypes for the callbacks are basically the same as for
|
|
||||||
* the stdio functions fread, fseek, fclose, ftell.
|
|
||||||
* The one difference is that the FILE * arguments have been replaced with
|
|
||||||
* a void * - this is to be used as a pointer to whatever internal data these
|
|
||||||
* functions might need. In the stdio case, it's just a FILE * cast to a void *
|
|
||||||
*
|
|
||||||
* If you use other functions, check the docs for these functions and return
|
|
||||||
* the right values. For seek_func(), you *MUST* return -1 if the stream is
|
|
||||||
* unseekable
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource);
|
|
||||||
int (*seek_func) (void *datasource, ogg_int64_t offset, int whence);
|
|
||||||
int (*close_func) (void *datasource);
|
|
||||||
long (*tell_func) (void *datasource);
|
|
||||||
} ov_callbacks;
|
|
||||||
|
|
||||||
#define NOTOPEN 0
|
|
||||||
#define PARTOPEN 1
|
|
||||||
#define OPENED 2
|
|
||||||
#define STREAMSET 3
|
|
||||||
#define INITSET 4
|
|
||||||
|
|
||||||
typedef struct OggVorbis_File {
|
|
||||||
void *datasource; /* Pointer to a FILE *, etc. */
|
|
||||||
int seekable;
|
|
||||||
ogg_int64_t offset;
|
|
||||||
ogg_int64_t end;
|
|
||||||
ogg_sync_state oy;
|
|
||||||
|
|
||||||
/* If the FILE handle isn't seekable (eg, a pipe), only the current
|
|
||||||
stream appears */
|
|
||||||
int links;
|
|
||||||
ogg_int64_t *offsets;
|
|
||||||
ogg_int64_t *dataoffsets;
|
|
||||||
long *serialnos;
|
|
||||||
ogg_int64_t *pcmlengths; /* overloaded to maintain binary
|
|
||||||
compatability; x2 size, stores both
|
|
||||||
beginning and end values */
|
|
||||||
vorbis_info *vi;
|
|
||||||
vorbis_comment *vc;
|
|
||||||
|
|
||||||
/* Decoding working state local storage */
|
|
||||||
ogg_int64_t pcm_offset;
|
|
||||||
int ready_state;
|
|
||||||
long current_serialno;
|
|
||||||
int current_link;
|
|
||||||
|
|
||||||
double bittrack;
|
|
||||||
double samptrack;
|
|
||||||
|
|
||||||
ogg_stream_state os; /* take physical pages, weld into a logical
|
|
||||||
stream of packets */
|
|
||||||
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
|
||||||
vorbis_block vb; /* local working space for packet->PCM decode */
|
|
||||||
|
|
||||||
ov_callbacks callbacks;
|
|
||||||
|
|
||||||
} OggVorbis_File;
|
|
||||||
|
|
||||||
extern int ov_clear(OggVorbis_File *vf);
|
|
||||||
extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
|
||||||
extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
|
|
||||||
char *initial, long ibytes, ov_callbacks callbacks);
|
|
||||||
|
|
||||||
extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
|
||||||
extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
|
|
||||||
char *initial, long ibytes, ov_callbacks callbacks);
|
|
||||||
extern int ov_test_open(OggVorbis_File *vf);
|
|
||||||
|
|
||||||
extern long ov_bitrate(OggVorbis_File *vf,int i);
|
|
||||||
extern long ov_bitrate_instant(OggVorbis_File *vf);
|
|
||||||
extern long ov_streams(OggVorbis_File *vf);
|
|
||||||
extern long ov_seekable(OggVorbis_File *vf);
|
|
||||||
extern long ov_serialnumber(OggVorbis_File *vf,int i);
|
|
||||||
|
|
||||||
extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
|
|
||||||
extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
|
|
||||||
extern double ov_time_total(OggVorbis_File *vf,int i);
|
|
||||||
|
|
||||||
extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
|
||||||
extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
|
||||||
extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
|
|
||||||
extern int ov_time_seek(OggVorbis_File *vf,double pos);
|
|
||||||
extern int ov_time_seek_page(OggVorbis_File *vf,double pos);
|
|
||||||
|
|
||||||
extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
|
|
||||||
extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
|
|
||||||
extern double ov_time_tell(OggVorbis_File *vf);
|
|
||||||
|
|
||||||
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
|
|
||||||
extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
|
|
||||||
|
|
||||||
extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
|
|
||||||
int *bitstream);
|
|
||||||
extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
|
|
||||||
int bigendianp,int word,int sgned,int *bitstream);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -26,7 +26,6 @@ RANCID_NETWORKING = 1
|
||||||
RELEASE?=1
|
RELEASE?=1
|
||||||
DEBUGANYWAY?=0
|
DEBUGANYWAY?=0
|
||||||
NOSOUND?=0
|
NOSOUND?=0
|
||||||
USE_OPENAL?=1
|
|
||||||
OPTLEVEL?=2
|
OPTLEVEL?=2
|
||||||
PROFILER?=0
|
PROFILER?=0
|
||||||
|
|
||||||
|
@ -52,6 +51,9 @@ ifneq (0,$(DEBUGANYWAY))
|
||||||
debug+=-ggdb
|
debug+=-ggdb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
JAUDIOLIBDIR=$(SRC)/jaudiolib
|
||||||
|
JAUDIOLIB=libjfaudiolib.a
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
AS=nasm
|
AS=nasm
|
||||||
|
@ -72,7 +74,7 @@ endif
|
||||||
|
|
||||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
||||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
|
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
|
||||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -D_FORTIFY_SOURCE=2 \
|
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(JAUDIOLIBDIR)/include -D_FORTIFY_SOURCE=2 \
|
||||||
-fjump-tables -fno-stack-protector
|
-fjump-tables -fno-stack-protector
|
||||||
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
||||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||||
|
@ -103,42 +105,6 @@ JMACTOBJ=$(OBJ)/util_lib.$o \
|
||||||
$(OBJ)/scriplib.$o \
|
$(OBJ)/scriplib.$o \
|
||||||
$(OBJ)/animlib.$o
|
$(OBJ)/animlib.$o
|
||||||
|
|
||||||
AUDIOLIB_FX_STUB=$(OBJ)/audiolib_fxstub.$o
|
|
||||||
AUDIOLIB_MUSIC_STUB=$(OBJ)/audiolib_musicstub.$o
|
|
||||||
|
|
||||||
AUDIOLIB_FX_SDL=$(OBJ)/ll_man.$o \
|
|
||||||
$(OBJ)/fx_man.$o \
|
|
||||||
$(OBJ)/dsl.$o \
|
|
||||||
$(OBJ)/pitch.$o \
|
|
||||||
$(OBJ)/multivoc.$o
|
|
||||||
|
|
||||||
AUDIOLIB_MUSIC_SDL=$(OBJ)/sdlmusic.$o
|
|
||||||
|
|
||||||
AUDIOLIB_FX=$(OBJ)/pitch.$o \
|
|
||||||
$(OBJ)/multivoc.$o \
|
|
||||||
$(OBJ)/ll_man.$o \
|
|
||||||
$(OBJ)/fx_man.$o \
|
|
||||||
$(OBJ)/dsoundout.$o
|
|
||||||
|
|
||||||
ifeq ($(USE_OPENAL),1)
|
|
||||||
AUDIOLIB_FX += $(OBJ)/openal.$o
|
|
||||||
endif
|
|
||||||
|
|
||||||
AUDIOLIB_MUSIC=$(OBJ)/midi.$o \
|
|
||||||
$(OBJ)/mpu401.$o \
|
|
||||||
$(OBJ)/music.$o
|
|
||||||
|
|
||||||
ifeq (0,$(NOASM))
|
|
||||||
# Assembly sound mixing code
|
|
||||||
AUDIOLIB_FX_SDL += $(OBJ)/mv_mix.$o $(OBJ)/mv_mix16.$o $(OBJ)/mvreverb.$o
|
|
||||||
AUDIOLIB_FX += $(OBJ)/mv_mix.$o $(OBJ)/mv_mix16.$o $(OBJ)/mvreverb.$o
|
|
||||||
else
|
|
||||||
# C fallbacks for sound mixing code
|
|
||||||
AUDIOLIB_FX_SDL += $(OBJ)/mv_mix-c.$o $(OBJ)/mvreverb-c.$o
|
|
||||||
AUDIOLIB_FX += $(OBJ)/mv_mix-c.$o $(OBJ)/mvreverb-c.$o
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
GAMEOBJS=$(OBJ)/game.$o \
|
GAMEOBJS=$(OBJ)/game.$o \
|
||||||
$(OBJ)/actors.$o \
|
$(OBJ)/actors.$o \
|
||||||
$(OBJ)/anim.$o \
|
$(OBJ)/anim.$o \
|
||||||
|
@ -157,6 +123,8 @@ GAMEOBJS=$(OBJ)/game.$o \
|
||||||
$(OBJ)/osdfuncs.$o \
|
$(OBJ)/osdfuncs.$o \
|
||||||
$(OBJ)/osdcmds.$o \
|
$(OBJ)/osdcmds.$o \
|
||||||
$(OBJ)/grpscan.$o \
|
$(OBJ)/grpscan.$o \
|
||||||
|
$(OBJ)/sounds.$o \
|
||||||
|
$(OBJ)/audiolib_musicstub.$o \
|
||||||
$(JMACTOBJ)
|
$(JMACTOBJ)
|
||||||
|
|
||||||
EDITOROBJS=$(OBJ)/astub.$o \
|
EDITOROBJS=$(OBJ)/astub.$o \
|
||||||
|
@ -168,7 +136,6 @@ ifeq ($(PLATFORM),LINUX)
|
||||||
OURCFLAGS += -fno-pic
|
OURCFLAGS += -fno-pic
|
||||||
NASMFLAGS += -f elf
|
NASMFLAGS += -f elf
|
||||||
LIBS += -lvorbisfile -lvorbis -logg
|
LIBS += -lvorbisfile -lvorbis -logg
|
||||||
USE_OPENAL = 0
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
|
@ -197,9 +164,10 @@ endif
|
||||||
ifeq ($(PLATFORM),WINDOWS)
|
ifeq ($(PLATFORM),WINDOWS)
|
||||||
OURCFLAGS += -fno-pic -DUNDERSCORES -I$(DXROOT)/include -I$(ALROOT)/include # -I$(ENETROOT)/include
|
OURCFLAGS += -fno-pic -DUNDERSCORES -I$(DXROOT)/include -I$(ALROOT)/include # -I$(ENETROOT)/include
|
||||||
NASMFLAGS+= -DUNDERSCORES -f win32
|
NASMFLAGS+= -DUNDERSCORES -f win32
|
||||||
LIBS += -L$(ALROOT)/lib -lvorbisfile -lvorbis -logg -lwsock32 -lws2_32 -lwinmm #-L$(ENETROOT)
|
LIBS += -L$(JAUDIOLIBDIR)/third-party/mingw32/lib -lvorbisfile -lvorbis -logg -lwsock32 -lws2_32 -lwinmm -ldsound
|
||||||
GAMEOBJS+= $(OBJ)/gameres.$o $(OBJ)/winbits.$o $(OBJ)/startwin.game.$o
|
GAMEOBJS+= $(OBJ)/gameres.$o $(OBJ)/winbits.$o $(OBJ)/startwin.game.$o
|
||||||
EDITOROBJS+= $(OBJ)/buildres.$o
|
EDITOROBJS+= $(OBJ)/buildres.$o
|
||||||
|
JAUDIOLIB=libjfaudiolib_win32.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RENDERTYPE),SDL)
|
ifeq ($(RENDERTYPE),SDL)
|
||||||
|
@ -209,17 +177,6 @@ ifeq ($(RENDERTYPE),SDL)
|
||||||
OURCFLAGS += -DSDL_FRAMEWORK
|
OURCFLAGS += -DSDL_FRAMEWORK
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(PLATFORM),WINDOWS)
|
|
||||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_SDL) $(AUDIOLIB_FX_SDL) $(OBJ)/sounds.$o
|
|
||||||
AUDIOLIBOBJ_M32=$(AUDIOLIB_FX_SDL) $(OBJ)/sounds_mapster32.$o
|
|
||||||
ifeq (0,$(SDL_FRAMEWORK))
|
|
||||||
LIBS+= -lSDL_mixer
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)/sounds.$o
|
|
||||||
AUDIOLIBOBJ_M32=$(AUDIOLIB_FX_STUB) $(OBJ)/sounds_mapster32.$o
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (1,$(HAVE_GTK2))
|
ifeq (1,$(HAVE_GTK2))
|
||||||
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
|
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
|
||||||
GAMEOBJS+= $(OBJ)/game_banner.$o $(OBJ)/startgtk.game.$o
|
GAMEOBJS+= $(OBJ)/game_banner.$o $(OBJ)/startgtk.game.$o
|
||||||
|
@ -230,29 +187,14 @@ ifeq ($(RENDERTYPE),SDL)
|
||||||
EDITOROBJS+= $(OBJ)/build_icon.$o
|
EDITOROBJS+= $(OBJ)/build_icon.$o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RENDERTYPE),WIN)
|
EDITOROBJS+= $(OBJ)/sounds_mapster32.$o
|
||||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)/sounds.$o
|
|
||||||
AUDIOLIBOBJ_M32=$(AUDIOLIB_FX) $(OBJ)/sounds_mapster32.$o
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(NOSOUND),1)
|
|
||||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)/sounds.$o
|
|
||||||
AUDIOLIBOBJ_M32=$(AUDIOLIB_FX_STUB) $(OBJ)/sounds_mapster32.$o
|
|
||||||
endif
|
|
||||||
|
|
||||||
GAMEOBJS+= $(AUDIOLIBOBJ)
|
|
||||||
EDITOROBJS+= $(AUDIOLIBOBJ_M32)
|
|
||||||
OURCFLAGS+= $(BUILDCFLAGS)
|
OURCFLAGS+= $(BUILDCFLAGS)
|
||||||
OURCXXFLAGS+= $(BUILDCFLAGS)
|
OURCXXFLAGS+= $(BUILDCFLAGS)
|
||||||
|
|
||||||
ifeq ($(USE_OPENAL),1)
|
|
||||||
OURCFLAGS+= -DUSE_OPENAL
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(PRETTY_OUTPUT),1)
|
ifeq ($(PRETTY_OUTPUT),1)
|
||||||
.SILENT:
|
.SILENT:
|
||||||
endif
|
endif
|
||||||
.PHONY: clean all engine $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB)
|
.PHONY: clean all engine $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB)
|
||||||
|
|
||||||
# TARGETS
|
# TARGETS
|
||||||
|
|
||||||
|
@ -266,7 +208,7 @@ all:
|
||||||
notice:
|
notice:
|
||||||
$(BUILD_STARTED)
|
$(BUILD_STARTED)
|
||||||
|
|
||||||
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB)
|
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB)
|
||||||
$(LINK_STATUS)
|
$(LINK_STATUS)
|
||||||
if $(CC) -o $@ $^ $(LIBS) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
|
if $(CC) -o $@ $^ $(LIBS) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
|
||||||
ifeq (1,$(RELEASE))
|
ifeq (1,$(RELEASE))
|
||||||
|
@ -275,7 +217,7 @@ ifeq (1,$(RELEASE))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB)
|
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB)
|
||||||
$(LINK_STATUS)
|
$(LINK_STATUS)
|
||||||
if $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
|
if $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
|
||||||
ifeq (1,$(RELEASE))
|
ifeq (1,$(RELEASE))
|
||||||
|
@ -317,14 +259,19 @@ endif
|
||||||
|
|
||||||
$(EOBJ)/$(ENGINELIB): enginelib
|
$(EOBJ)/$(ENGINELIB): enginelib
|
||||||
$(EOBJ)/$(EDITORLIB): editorlib
|
$(EOBJ)/$(EDITORLIB): editorlib
|
||||||
|
$(JAUDIOLIBDIR)/$(JAUDIOLIB):
|
||||||
|
ifeq ($(PRETTY_OUTPUT),1)
|
||||||
|
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(JAUDIOLIBDIR)\033[0;35m \033[0m\n"
|
||||||
|
endif
|
||||||
|
$(MAKE) -C $(JAUDIOLIBDIR) PRETTY_OUTPUT=$(PRETTY_OUTPUT) EROOT=$(EROOT)
|
||||||
|
ifeq ($(PRETTY_OUTPUT),1)
|
||||||
|
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n"
|
||||||
|
endif
|
||||||
|
|
||||||
# RULES
|
# RULES
|
||||||
$(OBJ)/%.$o: $(SRC)/%.nasm
|
$(OBJ)/%.$o: $(SRC)/%.nasm
|
||||||
$(COMPILE_STATUS)
|
$(COMPILE_STATUS)
|
||||||
$(AS) $(NASMFLAGS) $< -o $@
|
$(AS) $(NASMFLAGS) $< -o $@
|
||||||
$(OBJ)/%.$o: $(SRC)/jaudiolib/%.nasm
|
|
||||||
$(COMPILE_STATUS)
|
|
||||||
$(AS) $(NASMFLAGS) $< -o $@
|
|
||||||
|
|
||||||
$(OBJ)/%.$o: $(SRC)/%.c
|
$(OBJ)/%.$o: $(SRC)/%.c
|
||||||
$(COMPILE_STATUS)
|
$(COMPILE_STATUS)
|
||||||
|
@ -337,9 +284,6 @@ $(OBJ)/%.$o: $(SRC)/%.cpp
|
||||||
$(OBJ)/%.$o: $(SRC)/jmact/%.c
|
$(OBJ)/%.$o: $(SRC)/jmact/%.c
|
||||||
$(COMPILE_STATUS)
|
$(COMPILE_STATUS)
|
||||||
if $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
if $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||||
$(OBJ)/%.$o: $(SRC)/jaudiolib/%.c
|
|
||||||
$(COMPILE_STATUS)
|
|
||||||
if $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
|
||||||
|
|
||||||
$(OBJ)/%.$o: $(SRC)/misc/%.rc
|
$(OBJ)/%.$o: $(SRC)/misc/%.rc
|
||||||
$(COMPILE_STATUS)
|
$(COMPILE_STATUS)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
duke3d_h=$(EINC)/build.h $(EINC)/polymer.h $(EINC)/pragmas.h $(EINC)/compat.h $(EINC)/cache1d.h $(EINC)/baselayer.h $(SRC)/jmact/file_lib.h $(SRC)/jmact/util_lib.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/control.h $(INC)/gamedefs.h $(INC)/function.h $(INC)/config.h $(INC)/sounds.h $(INC)/rts.h $(INC)/_rts.h $(INC)/soundefs.h $(SRC)/jaudiolib/fx_man.h $(SRC)/jaudiolib/music.h $(INC)/namesdyn.h $(INC)/funct.h $(INC)/duke3d.h
|
duke3d_h=$(EINC)/build.h $(EINC)/polymer.h $(EINC)/pragmas.h $(EINC)/compat.h $(EINC)/cache1d.h $(EINC)/baselayer.h $(SRC)/jmact/file_lib.h $(SRC)/jmact/util_lib.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/control.h $(INC)/gamedefs.h $(INC)/function.h $(INC)/config.h $(INC)/sounds.h $(INC)/rts.h $(INC)/_rts.h $(INC)/soundefs.h $(JAUDIOLIBDIR)/include/fx_man.h $(JAUDIOLIBDIR)/include/music.h $(INC)/namesdyn.h $(INC)/funct.h $(INC)/duke3d.h
|
||||||
gamedef_h=$(SRC)/gamedef.h
|
gamedef_h=$(SRC)/gamedef.h
|
||||||
|
|
||||||
$(OBJ)/game.$o: $(SRC)/game.c $(SRC)/sync.c $(SRC)/jmact/scriplib.h $(duke3d_h) $(INC)/osdfuncs.h $(INC)/osdcmds.h $(INC)/grpscan.h
|
$(OBJ)/game.$o: $(SRC)/game.c $(SRC)/sync.c $(SRC)/jmact/scriplib.h $(duke3d_h) $(INC)/osdfuncs.h $(INC)/osdcmds.h $(INC)/grpscan.h
|
||||||
|
@ -47,7 +47,7 @@ $(OBJ)/scriplib.$o: $(SRC)/jmact/scriplib.c $(SRC)/jmact/scriplib.h $(SRC)/jmact
|
||||||
|
|
||||||
# jAudioLib objects
|
# jAudioLib objects
|
||||||
$(OBJ)/audiolib_fxstub.$o: $(SRC)/jaudiolib/audiolib_fxstub.c $(SRC)/jaudiolib/fx_man.h
|
$(OBJ)/audiolib_fxstub.$o: $(SRC)/jaudiolib/audiolib_fxstub.c $(SRC)/jaudiolib/fx_man.h
|
||||||
$(OBJ)/audiolib_musicstub.$o: $(SRC)/jaudiolib/audiolib_musicstub.c $(SRC)/jaudiolib/music.h
|
$(OBJ)/audiolib_musicstub.$o: $(SRC)/audiolib_musicstub.c $(JAUDIOLIBDIR)/include/music.h
|
||||||
|
|
||||||
$(OBJ)/mv_mix.$o: $(SRC)/jaudiolib/mv_mix.nasm
|
$(OBJ)/mv_mix.$o: $(SRC)/jaudiolib/mv_mix.nasm
|
||||||
$(OBJ)/mv_mix16.$o: $(SRC)/jaudiolib/mv_mix16.nasm
|
$(OBJ)/mv_mix16.$o: $(SRC)/jaudiolib/mv_mix16.nasm
|
||||||
|
|
|
@ -27,7 +27,7 @@ DXROOT="U:\SDKs\Microsoft DirectX SDK (April 2007)
|
||||||
MSSDKROOT="N:\Program Files\Microsoft Visual Studio 9.0\VC
|
MSSDKROOT="N:\Program Files\Microsoft Visual Studio 9.0\VC
|
||||||
PLATFORMSDK="N:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK
|
PLATFORMSDK="N:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK
|
||||||
|
|
||||||
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DUSE_OPENAL /DRANCID_NETWORKING /DPOLYMER
|
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DRANCID_NETWORKING /DPOLYMER
|
||||||
|
|
||||||
CC=cl
|
CC=cl
|
||||||
AS=ml
|
AS=ml
|
||||||
|
|
|
@ -573,79 +573,55 @@
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\_midi.h"
|
RelativePath=".\source\jaudiolib\src\_multivc.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\_multivc.h"
|
RelativePath=".\source\jaudiolib\src\driver_coreaudio.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\debugio.h"
|
RelativePath=".\source\jaudiolib\src\driver_directsound.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\dsl.h"
|
RelativePath=".\source\jaudiolib\src\driver_nosound.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\dsoundout.h"
|
RelativePath=".\source\jaudiolib\src\driver_sdl.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\fx_man.h"
|
RelativePath=".\source\jaudiolib\src\drivers.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\interrup.h"
|
RelativePath=".\source\jaudiolib\include\fx_man.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\linklist.h"
|
RelativePath=".\source\jaudiolib\src\linklist.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\ll_man.h"
|
RelativePath=".\source\jaudiolib\src\ll_man.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\midi.h"
|
RelativePath=".\source\jaudiolib\src\multivoc.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\mpu401.h"
|
RelativePath=".\source\jaudiolib\include\music.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\multivoc.h"
|
RelativePath=".\source\jaudiolib\src\pitch.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\music.h"
|
RelativePath=".\source\jaudiolib\include\sndcards.h"
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\openal.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\pitch.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\platform.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\sdlout.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\standard.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\usrhooks.h"
|
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
@ -653,63 +629,47 @@
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\audiolib_fxstub.c"
|
RelativePath=".\source\jaudiolib\src\driver_coreaudio.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\audiolib_musicstub.c"
|
RelativePath=".\source\jaudiolib\src\driver_directsound.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\dsl.c"
|
RelativePath=".\source\jaudiolib\src\driver_nosound.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\dsoundout.c"
|
RelativePath=".\source\jaudiolib\src\driver_sdl.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\fx_man.c"
|
RelativePath=".\source\jaudiolib\src\drivers.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\ll_man.c"
|
RelativePath=".\source\jaudiolib\src\fx_man.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\midi.c"
|
RelativePath=".\source\jaudiolib\src\mix.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\mpu401.c"
|
RelativePath=".\source\jaudiolib\src\mixst.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\multivoc.c"
|
RelativePath=".\source\jaudiolib\src\multivoc.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\music.c"
|
RelativePath=".\source\jaudiolib\src\pitch.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\source\jaudiolib\mv_mix-c.c"
|
RelativePath=".\source\jaudiolib\src\vorbis.c"
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\openal.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\pitch.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\sdlmusic.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\source\jaudiolib\sdlout.c"
|
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|
Loading…
Reference in a new issue