This commit is contained in:
Jan Hamal Dvořák 2024-07-22 20:34:16 +02:00
parent 4e6a29abbc
commit 518d6f55db

View file

@ -384,9 +384,9 @@ static void rf_rx_stop(void)
inline static int next_sample(const uint32_t *buf, int *h) inline static int next_sample(const uint32_t *buf, int *h)
{ {
int x1 = 2 * (buf[0] - buf[1]); int x1 = buf[0] - buf[1];
int x2 = 0; int x2 = 0;
int x3 = -2 * (buf[4] - buf[5]); int x3 = buf[5] - buf[4];
int x4 = 0; int x4 = 0;
int sample = 18 * h[9] + 14 * h[8] - 32 * h[7] - 33 * h[6] + 106 * h[5] + 362 * h[4] + int sample = 18 * h[9] + 14 * h[8] - 32 * h[7] - 33 * h[6] + 106 * h[5] + 362 * h[4] +
@ -404,7 +404,7 @@ inline static int next_sample(const uint32_t *buf, int *h)
h[1] = x3; h[1] = x3;
h[0] = x4; h[0] = x4;
return sample >> 10; return sample / 2260;
} }
static void rf_rx(void) static void rf_rx(void)