174 |
float x0 = pSrc[pos_int+2]; |
float x0 = pSrc[pos_int+2]; |
175 |
float x1 = pSrc[pos_int+4]; |
float x1 = pSrc[pos_int+4]; |
176 |
float x2 = pSrc[pos_int+6]; |
float x2 = pSrc[pos_int+6]; |
177 |
float a = (3 * (x0 - x1) - xm1 + x2) / 2; |
float a = (3.0f * (x0 - x1) - xm1 + x2) * 0.5f; |
178 |
float b = 2 * x1 + xm1 - (5 * x0 + x2) / 2; |
float b = 2.0f * x1 + xm1 - (5.0f * x0 + x2) * 0.5f; |
179 |
float c = (x1 - xm1) / 2; |
float c = (x1 - xm1) * 0.5f; |
180 |
#if ENABLE_FILTER |
#if ENABLE_FILTER |
181 |
pOutputLeft[i] += this->FilterLeft.Apply(&bq_base, &bq_main, effective_volume * ((((a * pos_fract) + b) * pos_fract + c) * pos_fract + x0)); |
pOutputLeft[i] += this->FilterLeft.Apply(&bq_base, &bq_main, effective_volume * ((((a * pos_fract) + b) * pos_fract + c) * pos_fract + x0)); |
182 |
#else // no filter |
#else // no filter |
188 |
x0 = pSrc[pos_int+3]; |
x0 = pSrc[pos_int+3]; |
189 |
x1 = pSrc[pos_int+5]; |
x1 = pSrc[pos_int+5]; |
190 |
x2 = pSrc[pos_int+7]; |
x2 = pSrc[pos_int+7]; |
191 |
a = (3 * (x0 - x1) - xm1 + x2) / 2; |
a = (3.0f * (x0 - x1) - xm1 + x2) * 0.5f; |
192 |
b = 2 * x1 + xm1 - (5 * x0 + x2) / 2; |
b = 2.0f * x1 + xm1 - (5.0f * x0 + x2) * 0.5f; |
193 |
c = (x1 - xm1) / 2; |
c = (x1 - xm1) * 0.5f; |
194 |
#if ENABLE_FILTER |
#if ENABLE_FILTER |
195 |
pOutputRight[i++] += this->FilterRight.Apply(&bq_base, &bq_main, effective_volume * ((((a * pos_fract) + b) * pos_fract + c) * pos_fract + x0)); |
pOutputRight[i++] += this->FilterRight.Apply(&bq_base, &bq_main, effective_volume * ((((a * pos_fract) + b) * pos_fract + c) * pos_fract + x0)); |
196 |
#else // no filter |
#else // no filter |
212 |
float x0 = pSrc[pos_int+1]; |
float x0 = pSrc[pos_int+1]; |
213 |
float x1 = pSrc[pos_int+2]; |
float x1 = pSrc[pos_int+2]; |
214 |
float x2 = pSrc[pos_int+3]; |
float x2 = pSrc[pos_int+3]; |
215 |
float a = (3 * (x0 - x1) - xm1 + x2) / 2; |
float a = (3.0f * (x0 - x1) - xm1 + x2) * 0.5f; |
216 |
float b = 2 * x1 + xm1 - (5 * x0 + x2) / 2; |
float b = 2.0f * x1 + xm1 - (5.0f * x0 + x2) * 0.5f; |
217 |
float c = (x1 - xm1) / 2; |
float c = (x1 - xm1) * 0.5f; |
218 |
float sample_point = effective_volume * ((((a * pos_fract) + b) * pos_fract + c) * pos_fract + x0); |
float sample_point = effective_volume * ((((a * pos_fract) + b) * pos_fract + c) * pos_fract + x0); |
219 |
#endif // USE_LINEAR_INTERPOLATION |
#endif // USE_LINEAR_INTERPOLATION |
220 |
|
|