aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/converter.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-10 13:40:45 -0700
committerChris Robinson <[email protected]>2017-04-10 13:40:45 -0700
commitcaae349fdc16a761cda511f74c4cc5c611f5591a (patch)
treec718ada67628b06d9ca8622431af345719054d39 /Alc/converter.c
parentcc79cb803ad27d92e3e44e89b59c5a6521e06d44 (diff)
Update the given source pointer in the sample converter
Diffstat (limited to 'Alc/converter.c')
-rw-r--r--Alc/converter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/converter.c b/Alc/converter.c
index 68752693..1ea2e70f 100644
--- a/Alc/converter.c
+++ b/Alc/converter.c
@@ -210,7 +210,7 @@ ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframe
}
-ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid *src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes)
+ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid **src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes)
{
const ALsizei SrcFrameSize = converter->mNumChannels * converter->mSrcTypeSize;
const ALsizei DstFrameSize = converter->mNumChannels * converter->mDstTypeSize;
@@ -237,7 +237,7 @@ ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid *src, ALsi
*srcframes = 0;
break;
}
- src = (ALbyte*)src + SrcFrameSize*-prepcount;
+ *src = (const ALbyte*)*src + SrcFrameSize*-prepcount;
*srcframes += prepcount;
prepcount = 0;
}
@@ -272,7 +272,7 @@ ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid *src, ALsi
for(chan = 0;chan < converter->mNumChannels;chan++)
{
- const ALbyte *SrcSamples = (const ALbyte*)src + converter->mSrcTypeSize*chan;
+ const ALbyte *SrcSamples = (const ALbyte*)*src + converter->mSrcTypeSize*chan;
ALbyte *DstSamples = (ALbyte*)dst + converter->mSrcTypeSize*chan;
const ALfloat *ResampledData;
ALsizei SrcDataEnd;
@@ -321,7 +321,7 @@ ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid *src, ALsi
converter->mFracOffset = DataPosFrac & FRACTIONMASK;
/* Update the src and dst pointers in case there's still more to do. */
- src = (const ALbyte*)src + SrcFrameSize*(DataPosFrac>>FRACTIONBITS);
+ *src = (const ALbyte*)*src + SrcFrameSize*(DataPosFrac>>FRACTIONBITS);
*srcframes -= mini(*srcframes, (DataPosFrac>>FRACTIONBITS));
dst = (ALbyte*)dst + DstFrameSize*DstSize;