Skip to content

Commit

Permalink
Slightly simplify calculating the minimum phase output
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Oct 26, 2023
1 parent 5f81366 commit b6aa73b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions utils/makemhr/makemhr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,7 @@ static void MinimumPhase(const uint n, double *mags, complex_d *out)
// Remove any DC offset the filter has.
mags[0] = EPSILON;
for(i = 0;i < n;i++)
{
auto a = std::exp(complex_d{0.0, out[i].imag()});
out[i] = a * mags[i];
}
out[i] = std::polar(mags[i], out[i].imag());
}


Expand Down

0 comments on commit b6aa73b

Please sign in to comment.