Re: [Csnd-dev] CPOF - omit outargs?
Pierre Clisson <[email protected]>
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks, it works :) vlz wrote on 06/07/2024 10:17: > You should use the InPlug base class instead of PlugIn. It has only one template argument. > > > Prof. Victor Lazzarini > Maynooth University > Ireland > >> On 6 Jul 2024, at 08:45, Pierre Clisson <[email protected]> wrote: >> >> Hi, >> >> I have an opcode that expects an array as input: >> >> csnd::plugin<MyOpcode>(csound, "myopcode", "k[]", "k[]", csnd::thread::k); >> >> For performance reasons, I modify this array in place instead of instantiating a new object: >> >> csnd::Vector<MYFLT> &in = inargs.vector_data<MYFLT>(0) >> csnd::Vector<MYFLT> &out = in; >> // ... >> >> So, it doesn't make sense to return anything from this opcode. But if I declare the opcode like this, the code builds but segfaults during execution: >> >> struct MyOpcode : csnd::Plugin<0, 1> { >> // ... >> }; >> csnd::plugin<MyOpcode>(csound, "myopcode", "", "k[]", csnd::thread::k); >> >> How can I omit outargs? >> >> Thanks, >> >> Pierre >> >>
smime.p7s
(application/pkcs7-signature, 4.3 KB) - not displayed