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

SC_Plugin.hpp: registerUnit, add no buffer aliasing flag. #4356

Merged
merged 1 commit into from
Dec 27, 2019

Conversation

mtmccrea
Copy link
Member

Purpose and Motivation

The registerUnit function conveniently combines registering constructors and destructors, but hard codes the flag that prevents buffer aliasing. Many UGens require non-aliased buffers. The older defines allowed this. This omission is noted in the example-plugins.

Types of changes

  • New feature
    This flag simply allows preventing buffer aliasing. The default value of 0 should be a good choice because it's more common, and ensures backwards compatibility.

To-do list

Questions for review:

  • Does anyone know if this was an oversight or if it was intentionally hard coded?
  • The argument name ins't great, so other suggestions are welcome. I'd also considered cantAliasBufs. Though I think it's better than the the corresponding enum, kUnitDef_CantAliasInputsToOutputs.
  • Code is tested
    • tested on a multi input/output, non-aligned ugen
  • All tests are passing
    • building showed no problems (macOS)
  • Updated documentation
    • after merging, example-plugins examples can be updated.
  • This PR is ready for review

@nhthn nhthn added this to the 3.11 milestone Mar 11, 2019
@nhthn
Copy link
Contributor

nhthn commented Mar 11, 2019

thanks!!!

Does anyone know if this was an oversight or if it was intentionally hard coded?

likely an oversight?

The argument name ins't great, so other suggestions are welcome. I'd also considered cantAliasBufs. Though I think it's better than the the corresponding enum, kUnitDef_CantAliasInputsToOutputs.

how about disableBufferAliasing?

@mtmccrea mtmccrea force-pushed the topic/scunit-bufalias branch from a30fdc3 to a1340dd Compare March 11, 2019 02:29
@mtmccrea
Copy link
Member Author

how about disableBufferAliasing?

That's clearly the better choice!

  • updated.

nhthn
nhthn previously requested changes Jun 2, 2019
Copy link
Contributor

@nhthn nhthn left a comment

Choose a reason for hiding this comment

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

this has merge conflicts now due to the codebase reformat. please #4428 for info on how to fix, and sorry about the inconvenience.

@mtmccrea mtmccrea force-pushed the topic/scunit-bufalias branch from a1340dd to 0f9ee9e Compare June 9, 2019 03:45
@mtmccrea
Copy link
Member Author

mtmccrea commented Jun 9, 2019

@snappizz, reformatted rebased and ready for review, thanks!

@sonoro1234
Copy link
Contributor

seems to be done?

@mtmccrea
Copy link
Member Author

seems to be done?

Yep!

@nhthn nhthn dismissed their stale review June 18, 2019 02:15

rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants