diff options
author | Chris Robinson <[email protected]> | 2017-06-23 08:25:47 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-06-23 08:25:47 -0700 |
commit | d70a98fe035ba5ea95e73095dafd76904162e27b (patch) | |
tree | 0fbf16b5faba6acf298f83a4216913c92dfde612 /Alc/converter.c | |
parent | 9d01ac440de6adfe348005622a065ebd4bd35e8f (diff) |
Use the correct destination channel offset
Diffstat (limited to 'Alc/converter.c')
-rw-r--r-- | Alc/converter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/converter.c b/Alc/converter.c index ee8bb7fb..c6e60454 100644 --- a/Alc/converter.c +++ b/Alc/converter.c @@ -282,7 +282,7 @@ ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid **src, ALs for(chan = 0;chan < converter->mNumChannels;chan++) { const ALbyte *SrcSamples = (const ALbyte*)*src + converter->mSrcTypeSize*chan; - ALbyte *DstSamples = (ALbyte*)dst + converter->mSrcTypeSize*chan; + ALbyte *DstSamples = (ALbyte*)dst + converter->mDstTypeSize*chan; const ALfloat *ResampledData; ALsizei SrcDataEnd; @@ -301,7 +301,7 @@ ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid **src, ALs SrcDataEnd = (DataPosFrac + increment*DstSize)>>FRACTIONBITS; if(SrcDataEnd >= prepcount+toread) memset(converter->Chan[chan].mPrevSamples, 0, - sizeof(converter->Chan[chan].mPrevSamples)); + sizeof(converter->Chan[chan].mPrevSamples)); else { size_t len = mini(MAX_PRE_SAMPLES+MAX_POST_SAMPLES, prepcount+toread-SrcDataEnd); |