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

Multichannel #15

Closed
thomasgeissl opened this issue Aug 29, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@thomasgeissl
Copy link

commented Aug 29, 2018

Hello,
as already mentioned in this post i have problems working with multichannel outputs.

It seems like setting the number of inputs and outputs crashes the app.
Thanks for having a look.

@npisanti

This comment has been minimized.

Copy link
Owner

commented Aug 30, 2018

adding post for reference:
https://forum.openframeworks.cc/t/ofxpdsp-mutlichannel/30285

can you please state your OS and IDE ?

@thomasgeissl

This comment has been minimized.

Copy link
Author

commented Aug 30, 2018

osx, 10.13.4, x-code. i was working with a focusrite scarlett 18i20.

@thomasgeissl

This comment has been minimized.

Copy link
Author

commented Sep 2, 2018

i had a quick look at it myself. resizing a processors outputs vector will call the copy constructor and there pdsp_trace gets called. i am wondering why you do not allow a patch node to be copy constructed.

the move operator behaves differently, i am not sure that this is on purpose.
it returns before calling pdsp_trace().

@npisanti

This comment has been minimized.

Copy link
Owner

commented Sep 3, 2018

i don't want any pdsp unit to be copied around, because what happen to the other units patched to it? my choices for the API when for example a class called B has to be copied and A is connected to it would be:

  1. patch all the connections from A to B and B'
  2. don't patch anything to B'

both those choices can lead to confusion or undefined behaviors, so i preferred being clear and avoiding copy, all the inputs and outputs emits warnings that can be traced when it happens. I still don't want pdsp::PatchNode to be copied around, i'll try as a quick fix to have more inputs by default for the pdsp::Processor, and then only some could be used, i think we could never use more than 32 channels so it could be a good max number for now.

@thomasgeissl

This comment has been minimized.

Copy link
Author

commented Sep 3, 2018

thanks for explanation, makes totally sense.
having 32 outputs and inputs by default and then reducing the number via the setChannels function should not call the copy constructor.

@npisanti

This comment has been minimized.

Copy link
Owner

commented Sep 3, 2018

i made the change, could you git pull and test it?

@thomasgeissl

This comment has been minimized.

Copy link
Author

commented Sep 4, 2018

Thanks Nicola, it works perfectly. Great work!

@npisanti

This comment has been minimized.

Copy link
Owner

commented Sep 4, 2018

perfect, i will further clean it with a #define for the max channels later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.