Re: [Csnd-dev] Plugin return types
John ff <[email protected]>
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Message-ID | <[email protected]> |
Should work On 5 Jun 2023, 09:31, at 09:31, Rory Walsh <[email protected]> wrote: >Can't you overload the opcode functions? I do this with a lot of >Cabbage >opcodes: > > csnd::plugin<GetCabbageValue>((csnd::Csound*) getCsound(), >"cabbageGetValue", "k", "S", csnd::thread::k); > csnd::plugin<GetCabbageValueArray>((csnd::Csound*) getCsound(), >"cabbageGetValue", "k[]", "S[]", csnd::thread::k); > csnd::plugin<GetCabbageValue>((csnd::Csound*) getCsound(), >"cabbageGetValue", "i", "S", csnd::thread::i); > csnd::plugin<GetCabbageValueWithTrigger>((csnd::Csound*) getCsound(), >"cabbageGetValue", "kk", "S", csnd::thread::k); > csnd::plugin<GetCabbageValueArrayWithTrigger>((csnd::Csound*) >getCsound(), "cabbageGetValue", "k[]k[]", "S[]", csnd::thread::k); > >On Mon, 5 Jun 2023 at 03:27, andy fillebrown ><[email protected]> >wrote: > >> I'm making a custom plugin for improved Websocket communication and >> I'm wondering if it's possible to use the same opcode name to return >a >> string or a k-array. Right now I have two opcodes in the plugin named >> "WSget_s" that returns a string and "WSget_k" that returns a k-array, >> but I'd really like to drop the _s and _k suffixes so I can just use >> "WSget". Is this possible with arrays? >>