[an error occurred while processing this directive]
|
делаем так (phase - 32-х битное, таблица 256 самплов, 16 бит Q15):
phase += freq;
int s1 = sin_table((phase>>24) & 0xFF);
int s2 = sin_table(((phase>>24)+1)&0xFF);
unsigned int coeff = (phase >> 8) & 0xFFFF;
int sample = s1 + (((s2-s1)*coeff) >> 16);
Это займет практически на любом DSP 7-12 тактов. Это много или мало?
E-mail: info@telesys.ru