Skip to content
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

Remove _process_core() and output normalization #80

Merged
merged 1 commit into from
Oct 15, 2023

Conversation

mikeoliphant
Copy link
Contributor

Removed _process_core(). Pass input/output/num_frames where needed instead of caching in local variables. Removed output normalization. Added functions for getting model normalization factor in dB and linear gain.

I also removed the anti-pop code for ConvNet - it needs to be replaced with a pre-warm.

Resolves #79

instead of caching in local variables. Removed output normalization.
Added functions for getting model normalization factor in dB and linear gain.
Copy link
Owner

@sdatkinson sdatkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience. LGTM! 👍🏻

@@ -63,44 +63,26 @@ class DSP
// DSP subclass implementation.
virtual void finalize_(const int num_frames);
double GetExpectedSampleRate() const { return mExpectedSampleRate; };
bool HasLoudness() { return mLoudness != TARGET_DSP_LOUDNESS; };
void SetNormalize(const bool normalize) { this->mNormalizeOutputLoudness = normalize; };
bool HasNormalization() { return mLoudness != TARGET_DSP_LOUDNESS; };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this'll work, but I'm going to mess w/ this a little bit. (I prefer "loudness" since I'm going to remove the "target" from this and let downstream users of this library decide for themselves how loud they want to aim for.

@sdatkinson sdatkinson merged commit 855bf50 into sdatkinson:main Oct 15, 2023
1 check passed
@mikeoliphant mikeoliphant deleted the process_refactor branch October 16, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of DSP::_process_core_() and DSP::_apply_output_level_(), make process() do what _process_core_() does
2 participants