-
-
Notifications
You must be signed in to change notification settings - Fork 32
test: biquad tests #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
test: biquad tests #722
Conversation
packages/react-native-audio-api/common/cpp/test/src/biquad/BiquadFilterChromium.cpp
Show resolved
Hide resolved
c9a7504
to
ebb69ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 👍
double a2 = coeffs.a2; | ||
|
||
for (size_t k = 0; k < frequency.size(); ++k) { | ||
if (frequency[k] < 0 || frequency[k] > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (frequency[k] < 0 || frequency[k] > 1) { | |
if (frequency[k] < 0.0 || frequency[k] > 1.0) { |
} | ||
|
||
auto omega = -PI * frequencyArray[i] / context_->getNyquistFrequency(); | ||
auto omega = -PI * frequencyArray[i]; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see: static constexpr float PI = std::numbers::pi_v<float>;
nvm then
|
||
auto omega = -PI * frequencyArray[i] / context_->getNyquistFrequency(); | ||
auto omega = -PI * frequencyArray[i]; | ||
auto z = std::complex<float>(cos(omega), sin(omega)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::cos
and std::sin
Closes RNAA-205
Introduced changes
Checklist