Move functions to where they're used
This commit is contained in:
@@ -1033,44 +1033,6 @@ static ALCboolean IsValidALCChannels(ALCenum channels)
|
||||
}
|
||||
|
||||
|
||||
ALboolean IsValidType(ALenum type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case AL_BYTE:
|
||||
case AL_UNSIGNED_BYTE:
|
||||
case AL_SHORT:
|
||||
case AL_UNSIGNED_SHORT:
|
||||
case AL_INT:
|
||||
case AL_UNSIGNED_INT:
|
||||
case AL_FLOAT:
|
||||
case AL_DOUBLE:
|
||||
case AL_MULAW:
|
||||
case AL_IMA4:
|
||||
case AL_BYTE3:
|
||||
case AL_UNSIGNED_BYTE3:
|
||||
return AL_TRUE;
|
||||
}
|
||||
return AL_FALSE;
|
||||
}
|
||||
|
||||
ALboolean IsValidChannels(ALenum channels)
|
||||
{
|
||||
switch(channels)
|
||||
{
|
||||
case AL_MONO:
|
||||
case AL_STEREO:
|
||||
case AL_REAR:
|
||||
case AL_QUAD:
|
||||
case AL_5POINT1:
|
||||
case AL_6POINT1:
|
||||
case AL_7POINT1:
|
||||
return AL_TRUE;
|
||||
}
|
||||
return AL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
void InitializeCriticalSection(CRITICAL_SECTION *cs)
|
||||
{
|
||||
|
||||
@@ -518,9 +518,6 @@ void SetDefaultWFXChannelOrder(ALCdevice *device);
|
||||
const ALCchar *DevFmtTypeString(enum DevFmtType type);
|
||||
const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans);
|
||||
|
||||
ALboolean IsValidType(ALenum type);
|
||||
ALboolean IsValidChannels(ALenum type);
|
||||
|
||||
#define HRIR_BITS (5)
|
||||
#define HRIR_LENGTH (1<<HRIR_BITS)
|
||||
#define HRIR_MASK (HRIR_LENGTH-1)
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
static ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei frames, enum UserFmtChannels chans, enum UserFmtType type, const ALvoid *data, ALboolean storesrc);
|
||||
static void ConvertData(ALvoid *dst, enum UserFmtType dstType, const ALvoid *src, enum UserFmtType srcType, ALsizei numchans, ALsizei len);
|
||||
static ALboolean IsValidType(ALenum type);
|
||||
static ALboolean IsValidChannels(ALenum channels);
|
||||
|
||||
#define LookupBuffer(m, k) ((ALbuffer*)LookupUIntMapKey(&(m), (k)))
|
||||
|
||||
@@ -2156,6 +2158,44 @@ ALboolean DecomposeFormat(ALenum format, enum FmtChannels *chans, enum FmtType *
|
||||
}
|
||||
|
||||
|
||||
static ALboolean IsValidType(ALenum type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case AL_BYTE:
|
||||
case AL_UNSIGNED_BYTE:
|
||||
case AL_SHORT:
|
||||
case AL_UNSIGNED_SHORT:
|
||||
case AL_INT:
|
||||
case AL_UNSIGNED_INT:
|
||||
case AL_FLOAT:
|
||||
case AL_DOUBLE:
|
||||
case AL_MULAW:
|
||||
case AL_IMA4:
|
||||
case AL_BYTE3:
|
||||
case AL_UNSIGNED_BYTE3:
|
||||
return AL_TRUE;
|
||||
}
|
||||
return AL_FALSE;
|
||||
}
|
||||
|
||||
static ALboolean IsValidChannels(ALenum channels)
|
||||
{
|
||||
switch(channels)
|
||||
{
|
||||
case AL_MONO:
|
||||
case AL_STEREO:
|
||||
case AL_REAR:
|
||||
case AL_QUAD:
|
||||
case AL_5POINT1:
|
||||
case AL_6POINT1:
|
||||
case AL_7POINT1:
|
||||
return AL_TRUE;
|
||||
}
|
||||
return AL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ReleaseALBuffers()
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user