diff options
author | Chris Robinson <[email protected]> | 2017-04-10 13:40:45 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-10 13:40:45 -0700 |
commit | caae349fdc16a761cda511f74c4cc5c611f5591a (patch) | |
tree | c718ada67628b06d9ca8622431af345719054d39 /Alc/converter.c | |
parent | cc79cb803ad27d92e3e44e89b59c5a6521e06d44 (diff) |
Update the given source pointer in the sample converter
Diffstat (limited to 'Alc/converter.c')
-rw-r--r-- | Alc/converter.c | 8 |
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; |