Fix LO generator
This commit is contained in:
parent
8a6283c5ae
commit
af75d81ce5
1 changed files with 1 additions and 1 deletions
|
@ -287,13 +287,13 @@ static void lo_generate(uint32_t *buf, size_t len, double freq, unsigned phase)
|
||||||
unsigned bits = 0;
|
unsigned bits = 0;
|
||||||
|
|
||||||
for (int j = 0; j < 32; j++) {
|
for (int j = 0; j < 32; j++) {
|
||||||
|
bits <<= 1;
|
||||||
#if LO_DITHER
|
#if LO_DITHER
|
||||||
int noise = (rnd_next() >> 3) - (rnd_next() >> 3);
|
int noise = (rnd_next() >> 3) - (rnd_next() >> 3);
|
||||||
bits |= (accum + noise) >> 31;
|
bits |= (accum + noise) >> 31;
|
||||||
#else
|
#else
|
||||||
bits |= accum >> 31;
|
bits |= accum >> 31;
|
||||||
#endif
|
#endif
|
||||||
bits <<= 1;
|
|
||||||
accum += step;
|
accum += step;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue