| 426 | } |
| 427 | |
| 428 | float GetInterpolatedSample(double offset, const float* buffer, int bufferSize) |
| 429 | { |
| 430 | offset = DoubleWrap(offset, bufferSize); |
| 431 | int pos = int(offset); |
| 432 | int posNext = int(offset + 1) % bufferSize; |
| 433 | |
| 434 | float sample = buffer[pos]; |
| 435 | float nextSample = buffer[posNext]; |
| 436 | float a = offset - pos; |
| 437 | float output = (1 - a) * sample + a * nextSample; //interpolate |
| 438 | |
| 439 | return output; |
| 440 | } |
| 441 | |
| 442 | float GetInterpolatedSample(double offset, ChannelBuffer* buffer, int bufferSize, float channelBlend) |
| 443 | { |
no test coverage detected