zenilib: zenilib/jni/external/openal-soft/OpenAL32/alBuffer.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Typedefs | Functions | Variables
alBuffer.c File Reference
`#include "config.h"`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <assert.h>`
`#include <limits.h>`
`#include "alMain.h"`
`#include "alu.h"`
`#include "alError.h"`
`#include "alBuffer.h"`
`#include "alThunk.h"`

Go to the source code of this file.

## Macros

#define | DECL_TEMPLATE(T)
#define | DECL_TEMPLATE(T)
#define | DECL_TEMPLATE(T)
#define | DECL_TEMPLATE(T)
#define | DECL_TEMPLATE(T1, T2)
#define | DECL_TEMPLATE(T)
#define | DECL_TEMPLATE(T)
#define | DECL_TEMPLATE(T)

## Typedefs

typedef ALubyte | ALalaw
typedef ALubyte | ALima4
typedef ALubyte | ALmulaw

## Functions

AL_API void AL_APIENTRY | alBuffer3f (ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3)
AL_API void AL_APIENTRY | alBuffer3i (ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3)
AL_API ALvoid AL_APIENTRY | alBufferData (ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq)
AL_API void AL_APIENTRY | alBufferf (ALuint buffer, ALenum param, ALfloat value)
AL_API void AL_APIENTRY | alBufferfv (ALuint buffer, ALenum param, const ALfloat *values)
AL_API void AL_APIENTRY | alBufferi (ALuint buffer, ALenum param, ALint value)
AL_API void AL_APIENTRY | alBufferiv (ALuint buffer, ALenum param, const ALint *values)
AL_API void AL_APIENTRY | alBufferSamplesSOFT (ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data)
AL_API ALvoid AL_APIENTRY | alBufferSubDataSOFT (ALuint buffer, ALenum format, const ALvoid *data, ALsizei offset, ALsizei length)
AL_API void AL_APIENTRY | alBufferSubSamplesSOFT (ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data)
AL_API ALvoid AL_APIENTRY | alDeleteBuffers (ALsizei n, const ALuint *buffers)
AL_API ALvoid AL_APIENTRY | alGenBuffers (ALsizei n, ALuint *buffers)
AL_API void AL_APIENTRY | alGetBuffer3f (ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3)
AL_API void AL_APIENTRY | alGetBuffer3i (ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3)
AL_API ALvoid AL_APIENTRY | alGetBufferf (ALuint buffer, ALenum param, ALfloat *value)
AL_API void AL_APIENTRY | alGetBufferfv (ALuint buffer, ALenum param, ALfloat *values)
AL_API ALvoid AL_APIENTRY | alGetBufferi (ALuint buffer, ALenum param, ALint *value)
AL_API void AL_APIENTRY | alGetBufferiv (ALuint buffer, ALenum param, ALint *values)
AL_API void AL_APIENTRY | alGetBufferSamplesSOFT (ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, ALvoid *data)
AL_API ALboolean AL_APIENTRY | alIsBuffer (ALuint buffer)
AL_API ALboolean AL_APIENTRY | alIsBufferFormatSupportedSOFT (ALenum format)
ALuint | BytesFromFmt (enum FmtType type)
ALuint | BytesFromUserFmt (enum UserFmtType type)
ALuint | ChannelsFromFmt (enum FmtChannels chans)
ALuint | ChannelsFromUserFmt (enum UserFmtChannels chans)
static __inline ALalaw | Conv_ALalaw_ALalaw (ALalaw val)
static __inline ALbyte3 | Conv_ALbyte3_ALbyte3 (ALbyte3 val)
static __inline ALbyte | Conv_ALbyte_ALalaw (ALalaw val)
static __inline ALbyte | Conv_ALbyte_ALbyte (ALbyte val)
static __inline ALbyte | Conv_ALbyte_ALbyte3 (ALbyte3 val)
static __inline ALbyte | Conv_ALbyte_ALdouble (ALdouble val)
static __inline ALbyte | Conv_ALbyte_ALfloat (ALfloat val)
static __inline ALbyte | Conv_ALbyte_ALint (ALint val)
static __inline ALbyte | Conv_ALbyte_ALmulaw (ALmulaw val)
static __inline ALbyte | Conv_ALbyte_ALshort (ALshort val)
static __inline ALbyte | Conv_ALbyte_ALubyte (ALubyte val)
static __inline ALbyte | Conv_ALbyte_ALubyte3 (ALubyte3 val)
static __inline ALbyte | Conv_ALbyte_ALuint (ALuint val)
static __inline ALbyte | Conv_ALbyte_ALushort (ALushort val)
static __inline ALdouble | Conv_ALdouble_ALalaw (ALalaw val)
static __inline ALdouble | Conv_ALdouble_ALbyte (ALbyte val)
static __inline ALdouble | Conv_ALdouble_ALbyte3 (ALbyte3 val)
static __inline ALdouble | Conv_ALdouble_ALdouble (ALdouble val)
static __inline ALdouble | Conv_ALdouble_ALfloat (ALfloat val)
static __inline ALdouble | Conv_ALdouble_ALint (ALint val)
static __inline ALdouble | Conv_ALdouble_ALmulaw (ALmulaw val)
static __inline ALdouble | Conv_ALdouble_ALshort (ALshort val)
static __inline ALdouble | Conv_ALdouble_ALubyte (ALubyte val)
static __inline ALdouble | Conv_ALdouble_ALubyte3 (ALubyte3 val)
static __inline ALdouble | Conv_ALdouble_ALuint (ALuint val)
static __inline ALdouble | Conv_ALdouble_ALushort (ALushort val)
static __inline ALfloat | Conv_ALfloat_ALalaw (ALalaw val)
static __inline ALfloat | Conv_ALfloat_ALbyte (ALbyte val)
static __inline ALfloat | Conv_ALfloat_ALbyte3 (ALbyte3 val)
static __inline ALfloat | Conv_ALfloat_ALdouble (ALdouble val)
static __inline ALfloat | Conv_ALfloat_ALfloat (ALfloat val)
static __inline ALfloat | Conv_ALfloat_ALint (ALint val)
static __inline ALfloat | Conv_ALfloat_ALmulaw (ALmulaw val)
static __inline ALfloat | Conv_ALfloat_ALshort (ALshort val)
static __inline ALfloat | Conv_ALfloat_ALubyte (ALubyte val)
static __inline ALfloat | Conv_ALfloat_ALubyte3 (ALubyte3 val)
static __inline ALfloat | Conv_ALfloat_ALuint (ALuint val)
static __inline ALfloat | Conv_ALfloat_ALushort (ALushort val)
static __inline ALint | Conv_ALint_ALalaw (ALalaw val)
static __inline ALint | Conv_ALint_ALbyte (ALbyte val)
static __inline ALint | Conv_ALint_ALbyte3 (ALbyte3 val)
static __inline ALint | Conv_ALint_ALdouble (ALdouble val)
static __inline ALint | Conv_ALint_ALfloat (ALfloat val)
static __inline ALint | Conv_ALint_ALint (ALint val)
static __inline ALint | Conv_ALint_ALmulaw (ALmulaw val)
static __inline ALint | Conv_ALint_ALshort (ALshort val)
static __inline ALint | Conv_ALint_ALubyte (ALubyte val)
static __inline ALint | Conv_ALint_ALubyte3 (ALubyte3 val)
static __inline ALint | Conv_ALint_ALuint (ALuint val)
static __inline ALint | Conv_ALint_ALushort (ALushort val)
static __inline ALmulaw | Conv_ALmulaw_ALmulaw (ALmulaw val)
static __inline ALshort | Conv_ALshort_ALalaw (ALalaw val)
static __inline ALshort | Conv_ALshort_ALbyte (ALbyte val)
static __inline ALshort | Conv_ALshort_ALbyte3 (ALbyte3 val)
static __inline ALshort | Conv_ALshort_ALdouble (ALdouble val)
static __inline ALshort | Conv_ALshort_ALfloat (ALfloat val)
static __inline ALshort | Conv_ALshort_ALint (ALint val)
static __inline ALshort | Conv_ALshort_ALmulaw (ALmulaw val)
static __inline ALshort | Conv_ALshort_ALshort (ALshort val)
static __inline ALshort | Conv_ALshort_ALubyte (ALubyte val)
static __inline ALshort | Conv_ALshort_ALubyte3 (ALubyte3 val)
static __inline ALshort | Conv_ALshort_ALuint (ALuint val)
static __inline ALshort | Conv_ALshort_ALushort (ALushort val)
static __inline ALubyte3 | Conv_ALubyte3_ALubyte3 (ALubyte3 val)
static __inline ALubyte | Conv_ALubyte_ALalaw (ALalaw val)
static __inline ALubyte | Conv_ALubyte_ALbyte (ALbyte val)
static __inline ALubyte | Conv_ALubyte_ALbyte3 (ALbyte3 val)
static __inline ALubyte | Conv_ALubyte_ALdouble (ALdouble val)
static __inline ALubyte | Conv_ALubyte_ALfloat (ALfloat val)
static __inline ALubyte | Conv_ALubyte_ALint (ALint val)
static __inline ALubyte | Conv_ALubyte_ALmulaw (ALmulaw val)
static __inline ALubyte | Conv_ALubyte_ALshort (ALshort val)
static __inline ALubyte | Conv_ALubyte_ALubyte (ALubyte val)
static __inline ALubyte | Conv_ALubyte_ALubyte3 (ALubyte3 val)
static __inline ALubyte | Conv_ALubyte_ALuint (ALuint val)
static __inline ALubyte | Conv_ALubyte_ALushort (ALushort val)
static __inline ALuint | Conv_ALuint_ALalaw (ALalaw val)
static __inline ALuint | Conv_ALuint_ALbyte (ALbyte val)
static __inline ALuint | Conv_ALuint_ALbyte3 (ALbyte3 val)
static __inline ALuint | Conv_ALuint_ALdouble (ALdouble val)
static __inline ALuint | Conv_ALuint_ALfloat (ALfloat val)
static __inline ALuint | Conv_ALuint_ALint (ALint val)
static __inline ALuint | Conv_ALuint_ALmulaw (ALmulaw val)
static __inline ALuint | Conv_ALuint_ALshort (ALshort val)
static __inline ALuint | Conv_ALuint_ALubyte (ALubyte val)
static __inline ALuint | Conv_ALuint_ALubyte3 (ALubyte3 val)
static __inline ALuint | Conv_ALuint_ALuint (ALuint val)
static __inline ALuint | Conv_ALuint_ALushort (ALushort val)
static __inline ALushort | Conv_ALushort_ALalaw (ALalaw val)
static __inline ALushort | Conv_ALushort_ALbyte (ALbyte val)
static __inline ALushort | Conv_ALushort_ALbyte3 (ALbyte3 val)
static __inline ALushort | Conv_ALushort_ALdouble (ALdouble val)
static __inline ALushort | Conv_ALushort_ALfloat (ALfloat val)
static __inline ALushort | Conv_ALushort_ALint (ALint val)
static __inline ALushort | Conv_ALushort_ALmulaw (ALmulaw val)
static __inline ALushort | Conv_ALushort_ALshort (ALshort val)
static __inline ALushort | Conv_ALushort_ALubyte (ALubyte val)
static __inline ALushort | Conv_ALushort_ALubyte3 (ALubyte3 val)
static __inline ALushort | Conv_ALushort_ALuint (ALuint val)
static __inline ALushort | Conv_ALushort_ALushort (ALushort val)
static void | Convert_ALima4_ALima4 (ALima4 *dst, const ALima4 *src, ALuint numchans, ALuint numblocks)
static void | ConvertData (ALvoid *dst, enum UserFmtType dstType, const ALvoid *src, enum UserFmtType srcType, ALsizei numchans, ALsizei len)
static __inline ALshort | DecodeALaw (ALalaw val)
static __inline ALint | DecodeByte3 (ALbyte3 val)
static void | DecodeIMA4Block (ALshort *dst, const ALima4 *src, ALint numchans)
static __inline ALshort | DecodeMuLaw (ALmulaw val)
static __inline ALint | DecodeUByte3 (ALubyte3 val)
static ALboolean | DecomposeFormat (ALenum format, enum FmtChannels *chans, enum FmtType *type)
static ALboolean | DecomposeUserFormat (ALenum format, enum UserFmtChannels *chans, enum UserFmtType *type)
static ALalaw | EncodeALaw (ALshort val)
static __inline ALbyte3 | EncodeByte3 (ALint val)
static void | EncodeIMA4Block (ALima4 *dst, const ALshort *src, ALint *sample, ALint *index, ALint numchans)
static ALmulaw | EncodeMuLaw (ALshort val)
static __inline ALubyte3 | EncodeUByte3 (ALint val)
static ALboolean | IsValidChannels (ALenum channels)
static ALboolean | IsValidType (ALenum type)
static ALenum | LoadData (ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei frames, enum UserFmtChannels chans, enum UserFmtType type, const ALvoid *data, ALboolean storesrc)
ALvoid | ReleaseALBuffers (ALCdevice *device)

## Variables

static const int | aLawClip = 32635
static const char | aLawCompressTable [128]
static const ALshort | aLawDecompressionTable [256]
ALbyte | ALbyte3_size_is_not_3 [(sizeof(ALbyte3)==sizeof(ALbyte[3]))?1:-1]
ALbyte | ALubyte3_size_is_not_3 [(sizeof(ALubyte3)==sizeof(ALubyte[3]))?1:-1]
static const int | IMA4Codeword [16]
static const int | IMA4Index_adjust [16]
static const int | IMAStep_size [89]
static const int | muLawBias = 0x84
static const int | muLawClip = 32635
static const char | muLawCompressTable [256]
static const ALshort | muLawDecompressionTable [256]

## Macro Definition Documentation

#define DECL_TEMPLATE | ( |  | T | ) |

Value:
static __inline ALmulaw Conv_ALmulaw_##T(T val) \
{ return EncodeMuLaw(Conv_ALshort_##T(val)); }
val
GLuint const GLfloat * val
Definition: glew.h:2715
ALmulaw
ALubyte ALmulaw
Definition: alBuffer.c:1022
EncodeMuLaw
static ALmulaw EncodeMuLaw(ALshort val)
Definition: alBuffer.c:1037

Definition at line 1820 of file alBuffer.c.

#define DECL_TEMPLATE | ( |  | T | ) |

Value:
static __inline ALalaw Conv_ALalaw_##T(T val) \
{ return EncodeALaw(Conv_ALshort_##T(val)); }
val
GLuint const GLfloat * val
Definition: glew.h:2715
ALalaw
ALubyte ALalaw
Definition: alBuffer.c:1023
EncodeALaw
static ALalaw EncodeALaw(ALshort val)
Definition: alBuffer.c:1062

Definition at line 1820 of file alBuffer.c.

#define DECL_TEMPLATE | ( |  | T | ) |

Value:
static __inline ALbyte3 Conv_ALbyte3_##T(T val) \
{ return EncodeByte3(Conv_ALint_##T(val)>>8); }
val
GLuint const GLfloat * val
Definition: glew.h:2715
EncodeByte3
static __inline ALbyte3 EncodeByte3(ALint val)
Definition: alBuffer.c:1213

Definition at line 1820 of file alBuffer.c.

#define DECL_TEMPLATE | ( |  | T | ) |

Value:
static __inline ALubyte3 Conv_ALubyte3_##T(T val) \
{ return EncodeUByte3(Conv_ALuint_##T(val)>>8); }
val
GLuint const GLfloat * val
Definition: glew.h:2715
EncodeUByte3
static __inline ALubyte3 EncodeUByte3(ALint val)
Definition: alBuffer.c:1234

Definition at line 1820 of file alBuffer.c.

#define DECL_TEMPLATE | ( |  | T1,
|  |  | T2
| ) |  |

Value:
static void Convert_##T1##_##T2(T1 *dst, const T2 *src, ALuint numchans, \
ALuint len) \
{ \
ALuint i, j; \
for(i = 0;i < len;i++) \
{ \
for(j = 0;j < numchans;j++) \
*(dst++) = Conv_##T1##_##T2(*(src++)); \
} \
}
j
int32_t j
Definition: e_log.c:102
len
GLenum GLsizei len
Definition: glew.h:7035
dst
GLenum GLenum dst
Definition: glew.h:2396
for
for(;;)
Definition: glslang_tab.cpp:4773
ALuint
unsigned int ALuint
Definition: al.h:59
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377

Definition at line 1820 of file alBuffer.c.

#define DECL_TEMPLATE | ( |  | T | ) |

Value:
static void Convert_##T##_ALima4(T *dst, const ALima4 *src, ALuint numchans, \
ALuint len) \
{ \
ALshort tmp[65*MaxChannels]; /* Max samples an IMA4 frame can be */ \
ALuint i, j, k; \
\
i = 0; \
while(i < len) \
{ \
DecodeIMA4Block(tmp, src, numchans); \
src += 36*numchans; \
\
for(j = 0;j < 65 && i < len;j++,i++) \
{ \
for(k = 0;k < numchans;k++) \
*(dst++) = Conv_##T##_ALshort(tmp[j*numchans + k]); \
} \
} \
}
DecodeIMA4Block
static void DecodeIMA4Block(ALshort *dst, const ALima4 *src, ALint numchans)
Definition: alBuffer.c:1088
k
int32_t k
Definition: e_log.c:102
j
int32_t j
Definition: e_log.c:102
ALshort
short ALshort
Definition: al.h:50
ALima4
ALubyte ALima4
Definition: alBuffer.c:1024
len
GLenum GLsizei len
Definition: glew.h:7035
dst
GLenum GLenum dst
Definition: glew.h:2396
for
for(;;)
Definition: glslang_tab.cpp:4773
ALuint
unsigned int ALuint
Definition: al.h:59
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377
while
while(1)
Definition: glslang_lex.cpp:1063
MaxChannels
Definition: alMain.h:491

Definition at line 1820 of file alBuffer.c.

#define DECL_TEMPLATE | ( |  | T | ) |

Value:
static void Convert_ALima4_##T(ALima4 *dst, const T *src, ALuint numchans, \
ALuint len) \
{ \
ALshort tmp[65*MaxChannels]; /* Max samples an IMA4 frame can be */ \
ALint sample[MaxChannels] = {0,0,0,0,0,0,0,0}; \
ALint index[MaxChannels] = {0,0,0,0,0,0,0,0}; \
ALuint i, j; \
\
for(i = 0;i < len;i += 65) \
{ \
for(j = 0;j < 65*numchans;j++) \
tmp[j] = Conv_ALshort_##T(*(src++)); \
EncodeIMA4Block(dst, tmp, sample, index, numchans); \
dst += 36*numchans; \
} \
}
EncodeIMA4Block
static void EncodeIMA4Block(ALima4 *dst, const ALshort *src, ALint *sample, ALint *index, ALint numchans)
Definition: alBuffer.c:1138
ALint
int ALint
Definition: al.h:56
j
int32_t j
Definition: e_log.c:102
ALshort
short ALshort
Definition: al.h:50
ALima4
ALubyte ALima4
Definition: alBuffer.c:1024
len
GLenum GLsizei len
Definition: glew.h:7035
dst
GLenum GLenum dst
Definition: glew.h:2396
for
for(;;)
Definition: glslang_tab.cpp:4773
index
GLuint index
Definition: glew.h:1800
ALuint
unsigned int ALuint
Definition: al.h:59
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377
MaxChannels
Definition: alMain.h:491

Definition at line 1820 of file alBuffer.c.

#define DECL_TEMPLATE | ( |  | T | ) |

Definition at line 1820 of file alBuffer.c.

## Typedef Documentation

typedef ALubyte ALalaw

Definition at line 1023 of file alBuffer.c.

typedef ALubyte ALima4

Definition at line 1024 of file alBuffer.c.

typedef ALubyte ALmulaw

Definition at line 1022 of file alBuffer.c.

## Function Documentation

AL_API void AL_APIENTRY alBuffer3f | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALfloat | value1,
|  | ALfloat | value2,
|  | ALfloat | value3
| ) |  |

Definition at line 639 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, al_throwerr, al_try, ALCcontext_DecRef(), ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API void AL_APIENTRY alBuffer3i | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALint | value1,
|  | ALint | value2,
|  | ALint | value3
| ) |  |

Definition at line 721 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, al_throwerr, al_try, ALCcontext_DecRef(), ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API ALvoid AL_APIENTRY alBufferData | ( | ALuint | buffer,
|  | ALenum | format,
|  | const ALvoid * | data,
|  | ALsizei | size,
|  | ALsizei | freq
| ) |  |

Specifies the data to be copied into a buffer

Definition at line 289 of file alBuffer.c.

References al_endtry, AL_FALSE, AL_FORMAT_51CHN16, AL_FORMAT_51CHN32, AL_FORMAT_61CHN16, AL_FORMAT_61CHN32, AL_FORMAT_71CHN16, AL_FORMAT_71CHN32, AL_FORMAT_MONO16, AL_FORMAT_MONO_FLOAT32, AL_FORMAT_QUAD16, AL_FORMAT_QUAD32, AL_FORMAT_REAR16, AL_FORMAT_REAR32, AL_FORMAT_STEREO16, AL_FORMAT_STEREO_FLOAT32, AL_INVALID_ENUM, AL_INVALID_NAME, AL_NO_ERROR, al_throwerr, AL_TRUE, al_try, ALCcontext_DecRef(), ChannelsFromUserFmt(), CHECK_VALUE, DecomposeUserFormat(), ALCcontext_struct::Device, FrameSizeFromUserFmt(), GetContextRef(), LoadData(), LookupBuffer, NULL, UserFmtAlaw, UserFmtByte, UserFmtByte3, UserFmtDouble, UserFmtFloat, UserFmtIMA4, UserFmtInt, UserFmtMono, UserFmtMulaw, UserFmtQuad, UserFmtRear, UserFmtShort, UserFmtStereo, UserFmtUByte, UserFmtUByte3, UserFmtUInt, UserFmtUShort, UserFmtX51, UserFmtX61, and UserFmtX71.

Referenced by wrap_BufferSamples().

AL_API void AL_APIENTRY alBufferf | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALfloat | value
| ) |  |

Set Buffer parameters,

Definition at line 612 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, al_throwerr, al_try, ALCcontext_DecRef(), ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API void AL_APIENTRY alBufferfv | ( | ALuint | buffer,
|  | ALenum | param,
|  | const ALfloat * | values
| ) |  |

Definition at line 668 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, al_throwerr, al_try, ALCcontext_DecRef(), CHECK_VALUE, ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API void AL_APIENTRY alBufferi | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALint | value
| ) |  |

Definition at line 694 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, al_throwerr, al_try, ALCcontext_DecRef(), ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API void AL_APIENTRY alBufferiv | ( | ALuint | buffer,
|  | ALenum | param,
|  | const ALint * | values
| ) |  |

Definition at line 750 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, AL_INVALID_OPERATION, AL_INVALID_VALUE, AL_LOOP_POINTS_SOFT, al_throwerr, al_try, ALCcontext_DecRef(), CHECK_VALUE, ALCcontext_struct::Device, GetContextRef(), ALbuffer::lock, LookupBuffer, ALbuffer::LoopEnd, ALbuffer::LoopStart, NULL, ALbuffer::ref, ALbuffer::SampleLen, WriteLock(), and WriteUnlock().

AL_API void AL_APIENTRY alBufferSamplesSOFT | ( | ALuint | buffer,
|  | ALuint | samplerate,
|  | ALenum | internalformat,
|  | ALsizei | samples,
|  | ALenum | channels,
|  | ALenum | type,
|  | const ALvoid * | data
| ) |  |

Definition at line 469 of file alBuffer.c.

References al_endtry, AL_FALSE, AL_INVALID_ENUM, AL_INVALID_NAME, AL_NO_ERROR, al_throwerr, al_try, ALCcontext_DecRef(), CHECK_VALUE, ALCcontext_struct::Device, GetContextRef(), IsValidChannels(), IsValidType(), LoadData(), LookupBuffer, and NULL.

AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT | ( | ALuint | buffer,
|  | ALenum | format,
|  | const ALvoid * | data,
|  | ALsizei | offset,
|  | ALsizei | length
| ) |  |

Definition at line 404 of file alBuffer.c.

References al_endtry, AL_FALSE, AL_INVALID_ENUM, AL_INVALID_NAME, AL_INVALID_VALUE, al_throwerr, al_try, ALCcontext_DecRef(), BytesFromFmt(), BytesFromUserFmt(), ChannelsFromFmt(), ChannelsFromUserFmt(), CHECK_VALUE, ConvertData(), ALbuffer::data, DecomposeUserFormat(), ALCcontext_struct::Device, ALbuffer::FmtChannels, ALbuffer::FmtType, FrameSizeFromUserFmt(), GetContextRef(), ALbuffer::lock, LookupBuffer, NULL, ALbuffer::OriginalChannels, ALbuffer::OriginalSize, ALbuffer::OriginalType, UserFmtIMA4, WriteLock(), and WriteUnlock().

AL_API void AL_APIENTRY alBufferSubSamplesSOFT | ( | ALuint | buffer,
|  | ALsizei | offset,
|  | ALsizei | samples,
|  | ALenum | channels,
|  | ALenum | type,
|  | const ALvoid * | data
| ) |  |

Definition at line 499 of file alBuffer.c.

References al_endtry, AL_FALSE, AL_INVALID_ENUM, AL_INVALID_NAME, AL_INVALID_VALUE, al_throwerr, al_try, ALCcontext_DecRef(), ChannelsFromFmt(), CHECK_VALUE, ConvertData(), ALbuffer::data, ALCcontext_struct::Device, ALbuffer::FmtChannels, ALbuffer::FmtType, FrameSizeFromFmt(), GetContextRef(), IsValidType(), ALbuffer::lock, LookupBuffer, NULL, ALbuffer::SampleLen, WriteLock(), and WriteUnlock().

AL_API ALvoid AL_APIENTRY alDeleteBuffers | ( | ALsizei | n,
|  | const ALuint * | buffers
| ) |  |

Delete Buffer objects

Definition at line 229 of file alBuffer.c.

References al_endtry, AL_INVALID_NAME, AL_INVALID_OPERATION, al_throwerr, al_try, ALCcontext_DecRef(), CHECK_VALUE, ALbuffer::data, ALCcontext_struct::Device, free, FreeThunkEntry(), GetContextRef(), i, ALbuffer::id, LookupBuffer, memset, NULL, ALbuffer::ref, and RemoveBuffer.

Referenced by alGenBuffers(), DeletePlayer(), LoadSound(), and main().

AL_API ALvoid AL_APIENTRY alGenBuffers | ( | ALsizei | n,
|  | ALuint * | buffers
| ) |  |

Create Buffer objects

Definition at line 183 of file alBuffer.c.

References al_catchany, al_endtry, AL_NO_ERROR, AL_OUT_OF_MEMORY, al_throwerr, al_try, ALCcontext_DecRef(), alDeleteBuffers(), ALCdevice_struct::BufferMap, calloc, CHECK_VALUE, ALCcontext_struct::Device, free, FreeThunkEntry(), GetContextRef(), ALbuffer::id, InsertUIntMapEntry(), ALbuffer::lock, memset, NewThunkEntry(), and RWLockInit().

Referenced by LoadSound(), and NewPlayer().

AL_API void AL_APIENTRY alGetBuffer3f | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALfloat * | value1,
|  | ALfloat * | value2,
|  | ALfloat * | value3
| ) |  |

Definition at line 832 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, al_throwerr, al_try, ALCcontext_DecRef(), CHECK_VALUE, ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API void AL_APIENTRY alGetBuffer3i | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALint * | value1,
|  | ALint * | value2,
|  | ALint * | value3
| ) |  |

Definition at line 949 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, al_throwerr, al_try, ALCcontext_DecRef(), CHECK_VALUE, ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API ALvoid AL_APIENTRY alGetBufferf | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALfloat * | value
| ) |  |

Get Buffer parameters.

Definition at line 796 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, AL_SEC_LENGTH_SOFT, al_throwerr, al_try, ALCcontext_DecRef(), CHECK_VALUE, ALCcontext_struct::Device, ALbuffer::Frequency, GetContextRef(), ALbuffer::lock, LookupBuffer, NULL, ReadLock(), ReadUnlock(), and ALbuffer::SampleLen.

Referenced by alGetBufferfv().

AL_API void AL_APIENTRY alGetBufferfv | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALfloat * | values
| ) |  |

Definition at line 858 of file alBuffer.c.

References al_endtry, AL_INVALID_ENUM, AL_INVALID_NAME, AL_SEC_LENGTH_SOFT, al_throwerr, al_try, ALCcontext_DecRef(), alGetBufferf(), CHECK_VALUE, ALCcontext_struct::Device, GetContextRef(), LookupBuffer, and NULL.

AL_API ALvoid AL_APIENTRY alGetBufferi | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALint * | value
| ) |  |

Definition at line 891 of file alBuffer.c.

References AL_BITS, AL_BYTE_LENGTH_SOFT, AL_CHANNELS, al_endtry, AL_FREQUENCY, AL_INTERNAL_FORMAT_SOFT, AL_INVALID_ENUM, AL_INVALID_NAME, AL_SAMPLE_LENGTH_SOFT, AL_SIZE, al_throwerr, al_try, ALCcontext_DecRef(), BytesFromFmt(), ChannelsFromFmt(), CHECK_VALUE, ALCcontext_struct::Device, ALbuffer::FmtChannels, ALbuffer::FmtType, ALbuffer::Format, FrameSizeFromFmt(), ALbuffer::Frequency, GetContextRef(), ALbuffer::lock, LookupBuffer, NULL, ALbuffer::OriginalSize, ReadLock(), ReadUnlock(), and ALbuffer::SampleLen.

Referenced by alGetBufferiv().

AL_API void AL_APIENTRY alGetBufferiv | ( | ALuint | buffer,
|  | ALenum | param,
|  | ALint * | values
| ) |  |

Definition at line 975 of file alBuffer.c.

References AL_BITS, AL_BYTE_LENGTH_SOFT, AL_CHANNELS, al_endtry, AL_FREQUENCY, AL_INTERNAL_FORMAT_SOFT, AL_INVALID_ENUM, AL_INVALID_NAME, AL_LOOP_POINTS_SOFT, AL_SAMPLE_LENGTH_SOFT, AL_SIZE, al_throwerr, al_try, ALCcontext_DecRef(), alGetBufferi(), CHECK_VALUE, ALCcontext_struct::Device, GetContextRef(), ALbuffer::lock, LookupBuffer, ALbuffer::LoopEnd, ALbuffer::LoopStart, NULL, ReadLock(), and ReadUnlock().

AL_API void AL_APIENTRY alGetBufferSamplesSOFT | ( | ALuint | buffer,
|  | ALsizei | offset,
|  | ALsizei | samples,
|  | ALenum | channels,
|  | ALenum | type,
|  | ALvoid * | data
| ) |  |

Definition at line 544 of file alBuffer.c.

References al_endtry, AL_FALSE, AL_INVALID_ENUM, AL_INVALID_NAME, AL_INVALID_VALUE, al_throwerr, al_try, ALCcontext_DecRef(), ChannelsFromFmt(), CHECK_VALUE, ConvertData(), ALbuffer::data, ALCcontext_struct::Device, ALbuffer::FmtChannels, ALbuffer::FmtType, FrameSizeFromFmt(), GetContextRef(), IsValidType(), ALbuffer::lock, LookupBuffer, NULL, ReadLock(), ReadUnlock(), ALbuffer::SampleLen, and UserFmtIMA4.

AL_API ALboolean AL_APIENTRY alIsBuffer | ( | ALuint | buffer | ) |

Verify a handle is a valid Buffer

Definition at line 272 of file alBuffer.c.

References AL_FALSE, AL_TRUE, ALCcontext_DecRef(), ALCcontext_struct::Device, GetContextRef(), and LookupBuffer.

Referenced by LoadSound().

AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT | ( | ALenum | format | ) |

Definition at line 594 of file alBuffer.c.

References AL_FALSE, ALCcontext_DecRef(), DecomposeFormat(), GetContextRef(), and ret.

ALuint BytesFromFmt | ( | enum FmtType | type | ) |

Definition at line 2109 of file alBuffer.c.

References FmtByte, FmtFloat, and FmtShort.

Referenced by alBufferSubDataSOFT(), alGetBufferi(), alSourceQueueBuffers(), FrameSizeFromFmt(), LoadData(), and SetSourceiv().

ALuint BytesFromUserFmt | ( | enum UserFmtType | type | ) |

Definition at line 2008 of file alBuffer.c.

References UserFmtAlaw, UserFmtByte, UserFmtByte3, UserFmtDouble, UserFmtFloat, UserFmtIMA4, UserFmtInt, UserFmtMulaw, UserFmtShort, UserFmtUByte, UserFmtUByte3, UserFmtUInt, and UserFmtUShort.

Referenced by alBufferSubDataSOFT(), and FrameSizeFromUserFmt().

ALuint ChannelsFromFmt | ( | enum FmtChannels | chans | ) |

Definition at line 2119 of file alBuffer.c.

References FmtMono, FmtQuad, FmtRear, FmtStereo, FmtX51, FmtX61, and FmtX71.

Referenced by alBufferSubDataSOFT(), alBufferSubSamplesSOFT(), alGetBufferi(), alGetBufferSamplesSOFT(), alSourceQueueBuffers(), FrameSizeFromFmt(), GetSourceOffsets(), LoadData(), and SetSourceiv().

ALuint ChannelsFromUserFmt | ( | enum UserFmtChannels | chans | ) |

Definition at line 2028 of file alBuffer.c.

References UserFmtMono, UserFmtQuad, UserFmtRear, UserFmtStereo, UserFmtX51, UserFmtX61, and UserFmtX71.

Referenced by alBufferData(), alBufferSubDataSOFT(), FrameSizeFromUserFmt(), GetSampleOffset(), and LoadData().

static __inline ALalaw Conv_ALalaw_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1530 of file alBuffer.c.

static __inline ALbyte3 Conv_ALbyte3_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1551 of file alBuffer.c.

static __inline ALbyte Conv_ALbyte_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1275 of file alBuffer.c.

References Conv_ALbyte_ALshort(), and DecodeALaw().

static __inline ALbyte Conv_ALbyte_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1249 of file alBuffer.c.

static __inline ALbyte Conv_ALbyte_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1277 of file alBuffer.c.

References DecodeByte3().

static __inline ALbyte Conv_ALbyte_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1267 of file alBuffer.c.

static __inline ALbyte Conv_ALbyte_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1261 of file alBuffer.c.

static __inline ALbyte Conv_ALbyte_ALint | ( | ALint | val | ) |

static

Definition at line 1257 of file alBuffer.c.

static __inline ALbyte Conv_ALbyte_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1273 of file alBuffer.c.

References Conv_ALbyte_ALshort(), and DecodeMuLaw().

static __inline ALbyte Conv_ALbyte_ALshort | ( | ALshort | val | ) |

static

Definition at line 1253 of file alBuffer.c.

Referenced by Conv_ALbyte_ALalaw(), and Conv_ALbyte_ALmulaw().

static __inline ALbyte Conv_ALbyte_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1251 of file alBuffer.c.

static __inline ALbyte Conv_ALbyte_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1279 of file alBuffer.c.

References DecodeUByte3().

static __inline ALbyte Conv_ALbyte_ALuint | ( | ALuint | val | ) |

static

Definition at line 1259 of file alBuffer.c.

static __inline ALbyte Conv_ALbyte_ALushort | ( | ALushort | val | ) |

static

Definition at line 1255 of file alBuffer.c.

static __inline ALdouble Conv_ALdouble_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1490 of file alBuffer.c.

References Conv_ALdouble_ALshort(), and DecodeALaw().

static __inline ALdouble Conv_ALdouble_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1472 of file alBuffer.c.

static __inline ALdouble Conv_ALdouble_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1492 of file alBuffer.c.

References DecodeByte3().

static __inline ALdouble Conv_ALdouble_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1486 of file alBuffer.c.

static __inline ALdouble Conv_ALdouble_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1484 of file alBuffer.c.

static __inline ALdouble Conv_ALdouble_ALint | ( | ALint | val | ) |

static

Definition at line 1480 of file alBuffer.c.

static __inline ALdouble Conv_ALdouble_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1488 of file alBuffer.c.

References Conv_ALdouble_ALshort(), and DecodeMuLaw().

static __inline ALdouble Conv_ALdouble_ALshort | ( | ALshort | val | ) |

static

Definition at line 1476 of file alBuffer.c.

Referenced by Conv_ALdouble_ALalaw(), and Conv_ALdouble_ALmulaw().

static __inline ALdouble Conv_ALdouble_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1474 of file alBuffer.c.

static __inline ALdouble Conv_ALdouble_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1494 of file alBuffer.c.

References DecodeUByte3().

static __inline ALdouble Conv_ALdouble_ALuint | ( | ALuint | val | ) |

static

Definition at line 1482 of file alBuffer.c.

References u.

static __inline ALdouble Conv_ALdouble_ALushort | ( | ALushort | val | ) |

static

Definition at line 1478 of file alBuffer.c.

static __inline ALfloat Conv_ALfloat_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1465 of file alBuffer.c.

References Conv_ALfloat_ALshort(), and DecodeALaw().

static __inline ALfloat Conv_ALfloat_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1447 of file alBuffer.c.

static __inline ALfloat Conv_ALfloat_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1467 of file alBuffer.c.

References DecodeByte3().

static __inline ALfloat Conv_ALfloat_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1461 of file alBuffer.c.

static __inline ALfloat Conv_ALfloat_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1459 of file alBuffer.c.

static __inline ALfloat Conv_ALfloat_ALint | ( | ALint | val | ) |

static

Definition at line 1455 of file alBuffer.c.

static __inline ALfloat Conv_ALfloat_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1463 of file alBuffer.c.

References Conv_ALfloat_ALshort(), and DecodeMuLaw().

static __inline ALfloat Conv_ALfloat_ALshort | ( | ALshort | val | ) |

static

Definition at line 1451 of file alBuffer.c.

Referenced by Conv_ALfloat_ALalaw(), and Conv_ALfloat_ALmulaw().

static __inline ALfloat Conv_ALfloat_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1449 of file alBuffer.c.

static __inline ALfloat Conv_ALfloat_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1469 of file alBuffer.c.

References DecodeUByte3().

static __inline ALfloat Conv_ALfloat_ALuint | ( | ALuint | val | ) |

static

Definition at line 1457 of file alBuffer.c.

References u.

static __inline ALfloat Conv_ALfloat_ALushort | ( | ALushort | val | ) |

static

Definition at line 1453 of file alBuffer.c.

static __inline ALint Conv_ALint_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1407 of file alBuffer.c.

References Conv_ALint_ALshort(), and DecodeALaw().

static __inline ALint Conv_ALint_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1381 of file alBuffer.c.

static __inline ALint Conv_ALint_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1409 of file alBuffer.c.

References DecodeByte3().

static __inline ALint Conv_ALint_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1399 of file alBuffer.c.

static __inline ALint Conv_ALint_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1393 of file alBuffer.c.

static __inline ALint Conv_ALint_ALint | ( | ALint | val | ) |

static

Definition at line 1389 of file alBuffer.c.

static __inline ALint Conv_ALint_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1405 of file alBuffer.c.

References Conv_ALint_ALshort(), and DecodeMuLaw().

static __inline ALint Conv_ALint_ALshort | ( | ALshort | val | ) |

static

Definition at line 1385 of file alBuffer.c.

Referenced by Conv_ALint_ALalaw(), and Conv_ALint_ALmulaw().

static __inline ALint Conv_ALint_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1383 of file alBuffer.c.

static __inline ALint Conv_ALint_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1411 of file alBuffer.c.

References DecodeUByte3().

static __inline ALint Conv_ALint_ALuint | ( | ALuint | val | ) |

static

Definition at line 1391 of file alBuffer.c.

References u.

static __inline ALint Conv_ALint_ALushort | ( | ALushort | val | ) |

static

Definition at line 1387 of file alBuffer.c.

static __inline ALmulaw Conv_ALmulaw_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1509 of file alBuffer.c.

static __inline ALshort Conv_ALshort_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1341 of file alBuffer.c.

References Conv_ALshort_ALshort(), and DecodeALaw().

static __inline ALshort Conv_ALshort_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1315 of file alBuffer.c.

static __inline ALshort Conv_ALshort_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1343 of file alBuffer.c.

References DecodeByte3().

static __inline ALshort Conv_ALshort_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1333 of file alBuffer.c.

static __inline ALshort Conv_ALshort_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1327 of file alBuffer.c.

static __inline ALshort Conv_ALshort_ALint | ( | ALint | val | ) |

static

Definition at line 1323 of file alBuffer.c.

static __inline ALshort Conv_ALshort_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1339 of file alBuffer.c.

References Conv_ALshort_ALshort(), and DecodeMuLaw().

static __inline ALshort Conv_ALshort_ALshort | ( | ALshort | val | ) |

static

Definition at line 1319 of file alBuffer.c.

Referenced by Conv_ALshort_ALalaw(), and Conv_ALshort_ALmulaw().

static __inline ALshort Conv_ALshort_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1317 of file alBuffer.c.

static __inline ALshort Conv_ALshort_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1345 of file alBuffer.c.

References DecodeUByte3().

static __inline ALshort Conv_ALshort_ALuint | ( | ALuint | val | ) |

static

Definition at line 1325 of file alBuffer.c.

static __inline ALshort Conv_ALshort_ALushort | ( | ALushort | val | ) |

static

Definition at line 1321 of file alBuffer.c.

static __inline ALubyte3 Conv_ALubyte3_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1572 of file alBuffer.c.

static __inline ALubyte Conv_ALubyte_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1308 of file alBuffer.c.

References Conv_ALubyte_ALshort(), and DecodeALaw().

static __inline ALubyte Conv_ALubyte_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1282 of file alBuffer.c.

static __inline ALubyte Conv_ALubyte_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1310 of file alBuffer.c.

References DecodeByte3().

static __inline ALubyte Conv_ALubyte_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1300 of file alBuffer.c.

static __inline ALubyte Conv_ALubyte_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1294 of file alBuffer.c.

static __inline ALubyte Conv_ALubyte_ALint | ( | ALint | val | ) |

static

Definition at line 1290 of file alBuffer.c.

static __inline ALubyte Conv_ALubyte_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1306 of file alBuffer.c.

References Conv_ALubyte_ALshort(), and DecodeMuLaw().

static __inline ALubyte Conv_ALubyte_ALshort | ( | ALshort | val | ) |

static

Definition at line 1286 of file alBuffer.c.

Referenced by Conv_ALubyte_ALalaw(), and Conv_ALubyte_ALmulaw().

static __inline ALubyte Conv_ALubyte_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1284 of file alBuffer.c.

static __inline ALubyte Conv_ALubyte_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1312 of file alBuffer.c.

References DecodeUByte3().

static __inline ALubyte Conv_ALubyte_ALuint | ( | ALuint | val | ) |

static

Definition at line 1292 of file alBuffer.c.

static __inline ALubyte Conv_ALubyte_ALushort | ( | ALushort | val | ) |

static

Definition at line 1288 of file alBuffer.c.

static __inline ALuint Conv_ALuint_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1440 of file alBuffer.c.

References Conv_ALuint_ALshort(), and DecodeALaw().

static __inline ALuint Conv_ALuint_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1414 of file alBuffer.c.

static __inline ALuint Conv_ALuint_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1442 of file alBuffer.c.

References DecodeByte3().

static __inline ALuint Conv_ALuint_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1432 of file alBuffer.c.

References u.

static __inline ALuint Conv_ALuint_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1426 of file alBuffer.c.

References u.

static __inline ALuint Conv_ALuint_ALint | ( | ALint | val | ) |

static

Definition at line 1422 of file alBuffer.c.

References u.

static __inline ALuint Conv_ALuint_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1438 of file alBuffer.c.

References Conv_ALuint_ALshort(), and DecodeMuLaw().

static __inline ALuint Conv_ALuint_ALshort | ( | ALshort | val | ) |

static

Definition at line 1418 of file alBuffer.c.

Referenced by Conv_ALuint_ALalaw(), and Conv_ALuint_ALmulaw().

static __inline ALuint Conv_ALuint_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1416 of file alBuffer.c.

static __inline ALuint Conv_ALuint_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1444 of file alBuffer.c.

References DecodeUByte3().

static __inline ALuint Conv_ALuint_ALuint | ( | ALuint | val | ) |

static

Definition at line 1424 of file alBuffer.c.

static __inline ALuint Conv_ALuint_ALushort | ( | ALushort | val | ) |

static

Definition at line 1420 of file alBuffer.c.

static __inline ALushort Conv_ALushort_ALalaw | ( | ALalaw | val | ) |

static

Definition at line 1374 of file alBuffer.c.

References Conv_ALushort_ALshort(), and DecodeALaw().

static __inline ALushort Conv_ALushort_ALbyte | ( | ALbyte | val | ) |

static

Definition at line 1348 of file alBuffer.c.

static __inline ALushort Conv_ALushort_ALbyte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1376 of file alBuffer.c.

References DecodeByte3().

static __inline ALushort Conv_ALushort_ALdouble | ( | ALdouble | val | ) |

static

Definition at line 1366 of file alBuffer.c.

static __inline ALushort Conv_ALushort_ALfloat | ( | ALfloat | val | ) |

static

Definition at line 1360 of file alBuffer.c.

static __inline ALushort Conv_ALushort_ALint | ( | ALint | val | ) |

static

Definition at line 1356 of file alBuffer.c.

static __inline ALushort Conv_ALushort_ALmulaw | ( | ALmulaw | val | ) |

static

Definition at line 1372 of file alBuffer.c.

References Conv_ALushort_ALshort(), and DecodeMuLaw().

static __inline ALushort Conv_ALushort_ALshort | ( | ALshort | val | ) |

static

Definition at line 1352 of file alBuffer.c.

Referenced by Conv_ALushort_ALalaw(), and Conv_ALushort_ALmulaw().

static __inline ALushort Conv_ALushort_ALubyte | ( | ALubyte | val | ) |

static

Definition at line 1350 of file alBuffer.c.

static __inline ALushort Conv_ALushort_ALubyte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1378 of file alBuffer.c.

References DecodeUByte3().

static __inline ALushort Conv_ALushort_ALuint | ( | ALuint | val | ) |

static

Definition at line 1358 of file alBuffer.c.

static __inline ALushort Conv_ALushort_ALushort | ( | ALushort | val | ) |

static

Definition at line 1354 of file alBuffer.c.

static void Convert_ALima4_ALima4 | ( | ALima4 * | dst,
|  | const ALima4 * | src,
|  | ALuint | numchans,
|  | ALuint | numblocks
| ) |  |

static

Definition at line 1812 of file alBuffer.c.

References memcpy.

static void ConvertData | ( | ALvoid * | dst,
|  | enum UserFmtType | dstType,
|  | const ALvoid * | src,
|  | enum UserFmtType | srcType,
|  | ALsizei | numchans,
|  | ALsizei | len
| ) |  |

static

Definition at line 1885 of file alBuffer.c.

References UserFmtAlaw, UserFmtByte, UserFmtByte3, UserFmtDouble, UserFmtFloat, UserFmtIMA4, UserFmtInt, UserFmtMulaw, UserFmtShort, UserFmtUByte, UserFmtUByte3, UserFmtUInt, and UserFmtUShort.

Referenced by alBufferSubDataSOFT(), alBufferSubSamplesSOFT(), alGetBufferSamplesSOFT(), and LoadData().

static __inline ALshort DecodeALaw | ( | ALalaw | val | ) |

static

Definition at line 1059 of file alBuffer.c.

References aLawDecompressionTable.

Referenced by Conv_ALbyte_ALalaw(), Conv_ALdouble_ALalaw(), Conv_ALfloat_ALalaw(), Conv_ALint_ALalaw(), Conv_ALshort_ALalaw(), Conv_ALubyte_ALalaw(), Conv_ALuint_ALalaw(), and Conv_ALushort_ALalaw().

static __inline ALint DecodeByte3 | ( | ALbyte3 | val | ) |

static

Definition at line 1206 of file alBuffer.c.

References IS_LITTLE_ENDIAN.

Referenced by Conv_ALbyte_ALbyte3(), Conv_ALdouble_ALbyte3(), Conv_ALfloat_ALbyte3(), Conv_ALint_ALbyte3(), Conv_ALshort_ALbyte3(), Conv_ALubyte_ALbyte3(), Conv_ALuint_ALbyte3(), and Conv_ALushort_ALbyte3().

static void DecodeIMA4Block | ( | ALshort * | dst,
|  | const ALima4 * | src,
|  | ALint | numchans
| ) |  |

static

Definition at line 1088 of file alBuffer.c.

References clampi(), IMA4Codeword, IMA4Index_adjust, IMAStep_size, j, k, MaxChannels, and nibble().

static __inline ALshort DecodeMuLaw | ( | ALmulaw | val | ) |

static

Definition at line 1034 of file alBuffer.c.

References muLawDecompressionTable.

Referenced by Conv_ALbyte_ALmulaw(), Conv_ALdouble_ALmulaw(), Conv_ALfloat_ALmulaw(), Conv_ALint_ALmulaw(), Conv_ALshort_ALmulaw(), Conv_ALubyte_ALmulaw(), Conv_ALuint_ALmulaw(), and Conv_ALushort_ALmulaw().

static __inline ALint DecodeUByte3 | ( | ALubyte3 | val | ) |

static

Definition at line 1227 of file alBuffer.c.

References IS_LITTLE_ENDIAN.

Referenced by Conv_ALbyte_ALubyte3(), Conv_ALdouble_ALubyte3(), Conv_ALfloat_ALubyte3(), Conv_ALint_ALubyte3(), Conv_ALshort_ALubyte3(), Conv_ALubyte_ALubyte3(), Conv_ALuint_ALubyte3(), and Conv_ALushort_ALubyte3().

static ALboolean DecomposeFormat | ( | ALenum | format,
|  | enum FmtChannels * | chans,
|  | enum FmtType * | type
| ) |  |

static

Definition at line 2133 of file alBuffer.c.

References AL_5POINT1_16_SOFT, AL_5POINT1_32F_SOFT, AL_5POINT1_8_SOFT, AL_6POINT1_16_SOFT, AL_6POINT1_32F_SOFT, AL_6POINT1_8_SOFT, AL_7POINT1_16_SOFT, AL_7POINT1_32F_SOFT, AL_7POINT1_8_SOFT, AL_FALSE, AL_FORMAT_QUAD16_LOKI, AL_FORMAT_QUAD8_LOKI, AL_MONO16_SOFT, AL_MONO32F_SOFT, AL_MONO8_SOFT, AL_QUAD16_SOFT, AL_QUAD32F_SOFT, AL_QUAD8_SOFT, AL_REAR16_SOFT, AL_REAR32F_SOFT, AL_REAR8_SOFT, AL_STEREO16_SOFT, AL_STEREO32F_SOFT, AL_STEREO8_SOFT, AL_TRUE, COUNTOF, FmtByte, FmtFloat, FmtMono, FmtQuad, FmtRear, FmtShort, FmtStereo, FmtX51, FmtX61, FmtX71, and i.

Referenced by alIsBufferFormatSupportedSOFT(), and LoadData().

static ALboolean DecomposeUserFormat | ( | ALenum | format,
|  | enum UserFmtChannels * | chans,
|  | enum UserFmtType * | type
| ) |  |

static

Definition at line 2042 of file alBuffer.c.

References AL_FALSE, AL_FORMAT_51CHN16, AL_FORMAT_51CHN32, AL_FORMAT_51CHN8, AL_FORMAT_51CHN_MULAW, AL_FORMAT_61CHN16, AL_FORMAT_61CHN32, AL_FORMAT_61CHN8, AL_FORMAT_61CHN_MULAW, AL_FORMAT_71CHN16, AL_FORMAT_71CHN32, AL_FORMAT_71CHN8, AL_FORMAT_71CHN_MULAW, AL_FORMAT_MONO16, AL_FORMAT_MONO8, AL_FORMAT_MONO_ALAW_EXT, AL_FORMAT_MONO_DOUBLE_EXT, AL_FORMAT_MONO_FLOAT32, AL_FORMAT_MONO_IMA4, AL_FORMAT_MONO_MULAW, AL_FORMAT_QUAD16, AL_FORMAT_QUAD16_LOKI, AL_FORMAT_QUAD32, AL_FORMAT_QUAD8, AL_FORMAT_QUAD8_LOKI, AL_FORMAT_QUAD_MULAW, AL_FORMAT_REAR16, AL_FORMAT_REAR32, AL_FORMAT_REAR8, AL_FORMAT_REAR_MULAW, AL_FORMAT_STEREO16, AL_FORMAT_STEREO8, AL_FORMAT_STEREO_ALAW_EXT, AL_FORMAT_STEREO_DOUBLE_EXT, AL_FORMAT_STEREO_FLOAT32, AL_FORMAT_STEREO_IMA4, AL_FORMAT_STEREO_MULAW, AL_TRUE, COUNTOF, i, UserFmtAlaw, UserFmtDouble, UserFmtFloat, UserFmtIMA4, UserFmtMono, UserFmtMulaw, UserFmtQuad, UserFmtRear, UserFmtShort, UserFmtStereo, UserFmtUByte, UserFmtX51, UserFmtX61, and UserFmtX71.

Referenced by alBufferData(), and alBufferSubDataSOFT().

static ALalaw EncodeALaw | ( | ALshort | val | ) |

static

Definition at line 1062 of file alBuffer.c.

References aLawClip, aLawCompressTable, maxi(), mini(), and sign.

static __inline ALbyte3 EncodeByte3 | ( | ALint | val | ) |

static

Definition at line 1213 of file alBuffer.c.

References IS_LITTLE_ENDIAN, and ret.

static void EncodeIMA4Block | ( | ALima4 * | dst,
|  | const ALshort * | src,
|  | ALint * | sample,
|  | ALint * | index,
|  | ALint | numchans
| ) |  |

static

Definition at line 1138 of file alBuffer.c.

References clampi(), IMA4Codeword, IMA4Index_adjust, IMAStep_size, j, k, mini(), and nibble().

static ALmulaw EncodeMuLaw | ( | ALshort | val | ) |

static

Definition at line 1037 of file alBuffer.c.

References maxi(), mini(), muLawBias, muLawClip, muLawCompressTable, and sign.

static __inline ALubyte3 EncodeUByte3 | ( | ALint | val | ) |

static

Definition at line 1234 of file alBuffer.c.

References IS_LITTLE_ENDIAN, and ret.

static ALboolean IsValidChannels | ( | ALenum | channels | ) |

static

Definition at line 2206 of file alBuffer.c.

References AL_5POINT1_SOFT, AL_6POINT1_SOFT, AL_7POINT1_SOFT, AL_FALSE, AL_MONO_SOFT, AL_QUAD_SOFT, AL_REAR_SOFT, AL_STEREO_SOFT, and AL_TRUE.

Referenced by alBufferSamplesSOFT().

static ALboolean IsValidType | ( | ALenum | type | ) |

static

Definition at line 2187 of file alBuffer.c.

References AL_BYTE3_SOFT, AL_BYTE_SOFT, AL_DOUBLE_SOFT, AL_FALSE, AL_FLOAT_SOFT, AL_INT_SOFT, AL_SHORT_SOFT, AL_TRUE, AL_UNSIGNED_BYTE3_SOFT, AL_UNSIGNED_BYTE_SOFT, AL_UNSIGNED_INT_SOFT, and AL_UNSIGNED_SHORT_SOFT.

Referenced by alBufferSamplesSOFT(), alBufferSubSamplesSOFT(), and alGetBufferSamplesSOFT().

static ALenum LoadData | ( | ALbuffer * | ALBuf,
|  | ALuint | freq,
|  | ALenum | NewFormat,
|  | ALsizei | frames,
|  | enum UserFmtChannels | chans,
|  | enum UserFmtType | type,
|  | const ALvoid * | data,
|  | ALboolean | storesrc
| ) |  |

static

OpenAL cross platform audio library Copyright (C) 1999-2007 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

Definition at line 1939 of file alBuffer.c.

References AL_FALSE, AL_INVALID_ENUM, AL_INVALID_OPERATION, AL_NO_ERROR, AL_OUT_OF_MEMORY, BytesFromFmt(), ChannelsFromFmt(), ChannelsFromUserFmt(), ConvertData(), ALbuffer::data, DecomposeFormat(), ALbuffer::FmtChannels, ALbuffer::FmtType, ALbuffer::Format, FrameSizeFromUserFmt(), ALbuffer::Frequency, ALbuffer::lock, ALbuffer::LoopEnd, ALbuffer::LoopStart, NULL, ALbuffer::OriginalChannels, ALbuffer::OriginalSize, ALbuffer::OriginalType, realloc, ALbuffer::ref, ALbuffer::SampleLen, UserFmtIMA4, WriteLock(), and WriteUnlock().

Referenced by alBufferData(), and alBufferSamplesSOFT().

ALvoid ReleaseALBuffers | ( | ALCdevice * | device | ) |

Definition at line 2228 of file alBuffer.c.

References UIntMap::array, ALCdevice_struct::BufferMap, ALbuffer::data, free, FreeThunkEntry(), i, ALbuffer::id, memset, NULL, UIntMap::size, and UIntMap::value.

Referenced by FreeDevice().

## Variable Documentation

const int aLawClip = 32635

static

Definition at line 170 of file alBuffer.c.

Referenced by EncodeALaw().

const char aLawCompressTable[128]

static

Initial value:
= {
1,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
}

Definition at line 171 of file alBuffer.c.

Referenced by EncodeALaw().

const ALshort aLawDecompressionTable[256]

static

Definition at line 134 of file alBuffer.c.

Referenced by DecodeALaw().

ALbyte ALbyte3_size_is_not_3[(sizeof(ALbyte3)==sizeof(ALbyte[3]))?1:-1]

ALbyte ALubyte3_size_is_not_3[(sizeof(ALubyte3)==sizeof(ALubyte[3]))?1:-1]

const int IMA4Codeword[16]

static

Initial value:
= {
1, 3, 5, 7, 9, 11, 13, 15,
-1,-3,-5,-7,-9,-11,-13,-15,
}

Definition at line 61 of file alBuffer.c.

Referenced by DecodeIMA4Block(), and EncodeIMA4Block().

const int IMA4Index_adjust[16]

static

Initial value:
= {
-1,-1,-1,-1, 2, 4, 6, 8,
-1,-1,-1,-1, 2, 4, 6, 8
}

Definition at line 67 of file alBuffer.c.

Referenced by DecodeIMA4Block(), and EncodeIMA4Block().

const int IMAStep_size[89]

static

Initial value:
= {
7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19,
21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55,
60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157,
173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449,
494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282,
1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660,
4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, 9493,10442,
11487,12635,13899,15289,16818,18500,20350,22358,24633,27086,29794,
32767
}

Definition at line 48 of file alBuffer.c.

Referenced by DecodeIMA4Block(), and EncodeIMA4Block().

const int muLawBias = 0x84

static

Definition at line 110 of file alBuffer.c.

Referenced by EncodeMuLaw().

const int muLawClip = 32635

static

Definition at line 111 of file alBuffer.c.

Referenced by EncodeMuLaw().

const char muLawCompressTable[256]

static

Initial value:
= {
0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
}

Definition at line 112 of file alBuffer.c.

Referenced by EncodeMuLaw().

const ALshort muLawDecompressionTable[256]

static

Definition at line 74 of file alBuffer.c.

Referenced by DecodeMuLaw().