blob: bf93039329595db81f2fdda1484d0e35dcbe50ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "libopna/opnassg.h"
void opna_ssg_sinc_calc_c(unsigned resampler_index, const int16_t *inbuf, int32_t *outbuf) {
for (int c = 0; c < 3; c++) {
int32_t chsample = 0;
for (int j = 0; j < OPNA_SSG_SINCTABLELEN; j++) {
unsigned sincindex = j;
if (!(resampler_index&1)) sincindex += OPNA_SSG_SINCTABLELEN;
chsample += inbuf[(((resampler_index)>>1)+j)*3+c] * opna_ssg_sinctable[sincindex];
}
outbuf[c] = chsample;
}
}
|