diff options
author | Chris Robinson <[email protected]> | 2011-07-02 02:54:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-07-02 02:54:05 -0700 |
commit | 7b87519c15fbb5b07e20ccdce6da13777548eee1 (patch) | |
tree | 21e4a1b5ee9825e2a2ca86bb4e727f6f06b56095 | |
parent | 14bfe0293a94c240be5b8c23998af6a6b8bbea20 (diff) |
Move functions to where they're used
-rw-r--r-- | Alc/ALc.c | 38 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 3 | ||||
-rw-r--r-- | OpenAL32/alBuffer.c | 40 |
3 files changed, 40 insertions, 41 deletions
@@ -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) { diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index ff1b3d4f..8b8db208 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -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) diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 604a3f5e..306d240d 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -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() * |