Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BatchDrake committed Apr 26, 2023
1 parent da9178c commit b179115
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sigutils/specttuner.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ SU_INSTANCER(
new->index = -1;

if (!full_spectrum) {
/* Tentative configuration */
new->k = 1. / (2 * PI / actual_bw);
/*
* XXX: THERE IS SOMETHING HERE I COULD NOT FULLY UNDERSTAND
*
Expand All @@ -328,6 +330,7 @@ SU_INSTANCER(
new->width = SU_CEIL(min_size / params->guard);
new->halfw = new->width >> 1;
} else {
new->k = 1. / (2 * PI / params->bw);
new->center =
2 * SU_FLOOR(.5 * (effective_freq + 1 * rbw) / (2 * PI) * window_size);
new->size = window_size;
Expand All @@ -339,7 +342,7 @@ SU_INSTANCER(

/* Adjust configuration to new size */
new->decimation = window_size / new->size;
new->k = 1. / window_size;
new->k = 1. / (new->decimation *new->size);

/*
* High precision mode: initialize local oscillator to compensate
Expand All @@ -354,7 +357,7 @@ SU_INSTANCER(
new->halfsz = new->size >> 1;
new->offset = new->size >> 2;

new->gain = 1.f;
new->gain = 1.;

SU_TRY_FAIL(new->width > 0);

Expand Down

0 comments on commit b179115

Please sign in to comment.