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 nam::DSP::finalize_() #110

Merged
merged 3 commits into from
Sep 8, 2024
Merged

Remove nam::DSP::finalize_() #110

merged 3 commits into from
Sep 8, 2024

Conversation

sdatkinson
Copy link
Owner

Description

Breaking change. Following this, Code calling NAM should not do (e.g.):

model->process(input, output, numFrames);
model->finalize_(numFrames);

and instead just do

model->process(input, output, numFrames);

And subclasses shall take care of any preparation for the next call to process themselves.

Subclasses that don't override nor extend DSP::finalize_():

  • Base
  • Gain
  • History
  • LSTM

Subclasses where some change was needed:

  • Buffer: This advanced the input buffer. Made an equivalent protected method _advance_input_buffer_() that subclasses can still use.
  • WaveNet: Move _advance_buffers_() inside of process.

Subclasses of Buffer also needed to be checked:

  • ConvNet: doesn't override, so _advance_input_buffer_() is pulled inside of process()
  • Linear: Same

Testing

I checked a render before and after using a typical WaveNet and ensured that they're the same.

@sdatkinson sdatkinson merged commit 184aad7 into main Sep 8, 2024
1 check passed
@sdatkinson sdatkinson deleted the 99-finalize branch September 8, 2024 20:22
@sdatkinson sdatkinson added the breaking This would be a breaking change label Sep 8, 2024
@sdatkinson
Copy link
Owner Author

Resolves #99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This would be a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant