Skip to content

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

Merged
sdatkinson merged 3 commits into
mainfrom
99-finalize
Sep 8, 2024
Merged

Remove nam::DSP::finalize_()#110
sdatkinson merged 3 commits into
mainfrom
99-finalize

Conversation

@sdatkinson

Copy link
Copy Markdown
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
@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
Copy Markdown
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