aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-18 15:37:39 -0700
committerChris Robinson <[email protected]>2019-08-18 15:37:39 -0700
commit2bbdd329cd6e1ea08f240f5420edadb076134302 (patch)
tree71dcd14c31402fc67b1e75587313d7eb279aa0ca /alc
parent6629b65ab94d9e8a856d860774a508805252daee (diff)
Use the appropriate type
Diffstat (limited to 'alc')
-rw-r--r--alc/mixvoice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/mixvoice.cpp b/alc/mixvoice.cpp
index c8833ed3..1fc5bd33 100644
--- a/alc/mixvoice.cpp
+++ b/alc/mixvoice.cpp
@@ -366,17 +366,17 @@ const ALfloat *DoFilters(BiquadFilter *lpfilter, BiquadFilter *hpfilter, ALfloat
template<FmtType T>
inline void LoadSampleArray(ALfloat *RESTRICT dst, const al::byte *src, ALint srcstep,
- const ptrdiff_t samples)
+ const size_t samples)
{
using SampleType = typename FmtTypeTraits<T>::Type;
const SampleType *RESTRICT ssrc{reinterpret_cast<const SampleType*>(src)};
- for(ALsizei i{0};i < samples;i++)
+ for(size_t i{0u};i < samples;i++)
dst[i] = FmtTypeTraits<T>::to_float(ssrc[i*srcstep]);
}
void LoadSamples(ALfloat *RESTRICT dst, const al::byte *src, ALint srcstep, FmtType srctype,
- const ptrdiff_t samples)
+ const size_t samples)
{
#define HANDLE_FMT(T) case T: LoadSampleArray<T>(dst, src, srcstep, samples); break
switch(srctype)
@@ -457,7 +457,7 @@ ALfloat *LoadBufferQueue(ALbufferlistitem *BufferListItem, ALbufferlistitem *Buf
continue;
}
- const size_t DataSize{std::min<size_t>(SrcBuffer.size(), Buffer->SampleLen-DataPosInt)};
+ const size_t DataSize{minz(SrcBuffer.size(), Buffer->SampleLen-DataPosInt)};
const al::byte *Data{Buffer->mData.data()};
Data += (DataPosInt*NumChannels + chan)*SampleSize;