cycfi / q

C++ Library for Audio Digital Signal Processing
MIT License
1.17k stars 151 forks source link

= operator overload #63

Closed propeller3D closed 1 year ago

propeller3D commented 1 year ago

Hello! I have a question about the = operator overload in the dc_block struct. Why does it take a boolean argument _y and assign it to the object? It’s not clear why this is done. Forgive me if the question is stupid because my c++ skills are limited and I’m still learning.

djowel commented 1 year ago

THAT is wrong. You caught a bug! Your c++ skills saved the day!

Would you like to do a PR? Should be an easy one. The bool must be a float which follows the documentation:

a = s : Set the latest result to s.

propeller3D commented 1 year ago

Happy to contribute. I’ll do it. I have never done a pull request so please allow me a day or so to do the proper research so I can do it properly. I’m studying your code style, it’s very nice. I’m trying to adapt some of it in my own code.

djowel commented 1 year ago

I’m studying your code style, it’s very nice. I’m trying to adapt some of it in my own code.

Very glad you liked it!

djowel commented 1 year ago

Fixed in #64