diff options
author | Chris Robinson <[email protected]> | 2017-01-18 07:13:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-01-18 07:13:23 -0800 |
commit | d2e5aa79ddc79bccde67d375cffea8f9922ca611 (patch) | |
tree | f39b0892cbbb877cd2d0ebc6d7270159dfdf91fa /OpenAL32 | |
parent | ba0944af9ba8d851bc5b6ad99f314bbdac269716 (diff) |
Use ALsizei in more places
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alAuxEffectSlot.h | 4 | ||||
-rw-r--r-- | OpenAL32/Include/alBuffer.h | 16 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 16 | ||||
-rw-r--r-- | OpenAL32/Include/alSource.h | 8 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 14 | ||||
-rw-r--r-- | OpenAL32/alBuffer.c | 20 |
6 files changed, 39 insertions, 39 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index 70fcac5c..40ff1393 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -18,7 +18,7 @@ typedef struct ALeffectState { const struct ALeffectStateVtable *vtbl; ALfloat (*OutBuffer)[BUFFERSIZE]; - ALuint OutChannels; + ALsizei OutChannels; } ALeffectState; void ALeffectState_Construct(ALeffectState *state); @@ -120,7 +120,7 @@ typedef struct ALeffectslot { /* Self ID */ ALuint id; - ALuint NumChannels; + ALsizei NumChannels; BFChannelConfig ChanMap[MAX_EFFECT_CHANNELS]; /* Wet buffer configuration is ACN channel order with N3D scaling: * * Channel 0 is the unattenuated mono signal. diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h index e99af050..062be452 100644 --- a/OpenAL32/Include/alBuffer.h +++ b/OpenAL32/Include/alBuffer.h @@ -36,9 +36,9 @@ enum UserFmtChannels { UserFmtBFormat3D = AL_BFORMAT3D_SOFT, /* WXYZ */ }; -ALuint BytesFromUserFmt(enum UserFmtType type); -ALuint ChannelsFromUserFmt(enum UserFmtChannels chans); -inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type) +ALsizei BytesFromUserFmt(enum UserFmtType type); +ALsizei ChannelsFromUserFmt(enum UserFmtChannels chans); +inline ALsizei FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type) { return ChannelsFromUserFmt(chans) * BytesFromUserFmt(type); } @@ -63,9 +63,9 @@ enum FmtChannels { }; #define MAX_INPUT_CHANNELS (8) -ALuint BytesFromFmt(enum FmtType type); -ALuint ChannelsFromFmt(enum FmtChannels chans); -inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type) +ALsizei BytesFromFmt(enum FmtType type); +ALsizei ChannelsFromFmt(enum FmtChannels chans); +inline ALsizei FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type) { return ChannelsFromFmt(chans) * BytesFromFmt(type); } @@ -87,8 +87,8 @@ typedef struct ALbuffer { ALsizei OriginalSize; ALsizei OriginalAlign; - ALsizei LoopStart; - ALsizei LoopEnd; + ALsizei LoopStart; + ALsizei LoopEnd; ATOMIC(ALsizei) UnpackAlign; ATOMIC(ALsizei) PackAlign; diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index fca98be9..fd90a49a 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -499,9 +499,9 @@ enum DevFmtChannels { }; #define MAX_OUTPUT_CHANNELS (16) -ALuint BytesFromDevFmt(enum DevFmtType type); -ALuint ChannelsFromDevFmt(enum DevFmtChannels chans); -inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type) +ALsizei BytesFromDevFmt(enum DevFmtType type); +ALsizei ChannelsFromDevFmt(enum DevFmtChannels chans); +inline ALsizei FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type) { return ChannelsFromDevFmt(chans) * BytesFromDevFmt(type); } @@ -682,20 +682,20 @@ struct ALCdevice_struct * first-order, 9 for second-order, etc). If the count is 0, Ambi.Map * is used instead to map each output to a coefficient index. */ - ALuint CoeffCount; + ALsizei CoeffCount; ALfloat (*Buffer)[BUFFERSIZE]; - ALuint NumChannels; + ALsizei NumChannels; } Dry; /* First-order ambisonics output, to be upsampled to the dry buffer if different. */ struct { AmbiConfig Ambi; /* Will only be 4 or 0. */ - ALuint CoeffCount; + ALsizei CoeffCount; ALfloat (*Buffer)[BUFFERSIZE]; - ALuint NumChannels; + ALsizei NumChannels; } FOAOut; /* "Real" output, which will be written to the device buffer. May alias the @@ -705,7 +705,7 @@ struct ALCdevice_struct enum Channel ChannelName[MAX_OUTPUT_CHANNELS]; ALfloat (*Buffer)[BUFFERSIZE]; - ALuint NumChannels; + ALsizei NumChannels; } RealOut; /* Running count of the mixer invocations, in 31.1 fixed point. This diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 8b793102..4f04efe2 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -96,12 +96,12 @@ typedef struct ALvoice { struct { ALfloat (*Buffer)[BUFFERSIZE]; - ALuint Channels; + ALsizei Channels; } DirectOut; struct { ALfloat (*Buffer)[BUFFERSIZE]; - ALuint Channels; + ALsizei Channels; } SendOut[MAX_SENDS]; struct { @@ -194,8 +194,8 @@ typedef struct ALsource { ATOMIC(ALboolean) looping; /** Current buffer sample info. */ - ALuint NumChannels; - ALuint SampleSize; + ALsizei NumChannels; + ALsizei SampleSize; ALenum NeedsUpdate; diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 21b787d2..dba167d4 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -313,8 +313,8 @@ void CalcAngleCoeffs(ALfloat azimuth, ALfloat elevation, ALfloat spread, ALfloat else \ ComputeAmbientGainsBF((b).Ambi.Map, (b).NumChannels, g, o); \ } while (0) -void ComputeAmbientGainsMC(const ChannelConfig *chancoeffs, ALuint numchans, ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); -void ComputeAmbientGainsBF(const BFChannelConfig *chanmap, ALuint numchans, ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +void ComputeAmbientGainsMC(const ChannelConfig *chancoeffs, ALsizei numchans, ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +void ComputeAmbientGainsBF(const BFChannelConfig *chanmap, ALsizei numchans, ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); /** * ComputePanningGains @@ -328,8 +328,8 @@ void ComputeAmbientGainsBF(const BFChannelConfig *chanmap, ALuint numchans, ALfl else \ ComputePanningGainsBF((b).Ambi.Map, (b).NumChannels, c, g, o); \ } while (0) -void ComputePanningGainsMC(const ChannelConfig *chancoeffs, ALuint numchans, ALuint numcoeffs, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); -void ComputePanningGainsBF(const BFChannelConfig *chanmap, ALuint numchans, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +void ComputePanningGainsMC(const ChannelConfig *chancoeffs, ALsizei numchans, ALsizei numcoeffs, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +void ComputePanningGainsBF(const BFChannelConfig *chanmap, ALsizei numchans, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); /** * ComputeFirstOrderGains @@ -344,11 +344,11 @@ void ComputePanningGainsBF(const BFChannelConfig *chanmap, ALuint numchans, cons else \ ComputeFirstOrderGainsBF((b).Ambi.Map, (b).NumChannels, m, g, o); \ } while (0) -void ComputeFirstOrderGainsMC(const ChannelConfig *chancoeffs, ALuint numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); -void ComputeFirstOrderGainsBF(const BFChannelConfig *chanmap, ALuint numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +void ComputeFirstOrderGainsMC(const ChannelConfig *chancoeffs, ALsizei numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +void ComputeFirstOrderGainsBF(const BFChannelConfig *chanmap, ALsizei numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); -ALvoid MixSource(struct ALvoice *voice, struct ALsource *source, ALCdevice *Device, ALuint SamplesToDo); +ALvoid MixSource(struct ALvoice *voice, struct ALsource *source, ALCdevice *Device, ALsizei SamplesToDo); ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size); /* Caller must lock the device. */ diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 24470d64..45a8cb5b 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -42,8 +42,8 @@ extern inline void LockBuffersWrite(ALCdevice *device); extern inline void UnlockBuffersWrite(ALCdevice *device); extern inline struct ALbuffer *LookupBuffer(ALCdevice *device, ALuint id); extern inline struct ALbuffer *RemoveBuffer(ALCdevice *device, ALuint id); -extern inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type); -extern inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type); +extern inline ALsizei FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type); +extern inline ALsizei FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type); static ALboolean IsValidType(ALenum type); static ALboolean IsValidChannels(ALenum channels); @@ -145,7 +145,7 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoi ALCcontext *context; ALbuffer *albuf; ALenum newformat = AL_NONE; - ALuint framesize; + ALsizei framesize; ALsizei align; ALenum err; @@ -293,9 +293,9 @@ AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer, ALenum format, cons ALCdevice *device; ALCcontext *context; ALbuffer *albuf; - ALuint byte_align; - ALuint channels; - ALuint bytes; + ALsizei byte_align; + ALsizei channels; + ALsizei bytes; ALsizei align; context = GetContextRef(); @@ -1074,7 +1074,7 @@ ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei frames, } -ALuint BytesFromUserFmt(enum UserFmtType type) +ALsizei BytesFromUserFmt(enum UserFmtType type) { switch(type) { @@ -1095,7 +1095,7 @@ ALuint BytesFromUserFmt(enum UserFmtType type) } return 0; } -ALuint ChannelsFromUserFmt(enum UserFmtChannels chans) +ALsizei ChannelsFromUserFmt(enum UserFmtChannels chans) { switch(chans) { @@ -1190,7 +1190,7 @@ static ALboolean DecomposeUserFormat(ALenum format, enum UserFmtChannels *chans, return AL_FALSE; } -ALuint BytesFromFmt(enum FmtType type) +ALsizei BytesFromFmt(enum FmtType type) { switch(type) { @@ -1200,7 +1200,7 @@ ALuint BytesFromFmt(enum FmtType type) } return 0; } -ALuint ChannelsFromFmt(enum FmtChannels chans) +ALsizei ChannelsFromFmt(enum FmtChannels chans) { switch(chans) { |