From d70a98fe035ba5ea95e73095dafd76904162e27b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 23 Jun 2017 08:25:47 -0700 Subject: [PATCH] Use the correct destination channel offset --- Alc/converter.c | 4 ++-- 1 file 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);