Re: [Csnd-dev] plugin opcodes / API Changes
Eduardo Moguillansky <[email protected]>
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Message-ID | <CAHFFss+DR710Rxm9cQgO9PN1U7fm2+6PkKK=wom_b8_FTRpe6Q@mail.gmail.com> |
Thanks for the clarification. >> * GetInstrument is gone. Was it renamed? Or is it no longer possible to provide the functionality? > GetInstrumentNumber? It's an inline There was a function csound->GetInstrument with the signature INSTRTXT *(*GetInstrument)(CSOUND*, int, const char *); On Thu, Nov 7, 2024 at 11:33 PM vlz <[email protected]> wrote: > There's an API migration document under docs, but at the moment it only > covers the host API. I've got to annotate the module API better so we can > have a clean doxygen output. > > > On 7 Nov 2024, at 20:21, Eduardo Moguillansky < > [email protected]> wrote: > > > > > > As a first approach to making plugins compatible with csound7: is there > any document regarding the changes in the API exposed for opcodes (methods > renamed, removed, etc in the csound struct)? > > > > At a first glance, I have problems with the following: > > > > * GetSr is missing. There are some ugly macros, like CS_ESR which seem > to do the "right" thing, should plugins use that? > > You can use the macros, or you can use the inline functions GetLocalSr() > etc. There is no GetSr() because SR is now local. Opcodes should use that. > > > * GetKr: same as GetSr > > as above. I just noticed there's some old fixme comments left over from a > merge, just ignore them > > > * GetInstrument is gone. Was it renamed? Or is it no longer possible to > provide the functionality? > > GetInstrumentNumber? It's an inline > > > * RegisterDeinitCallback is gone. How can a plugin implement this? > > There is no deinit callback anymore. You can provide a deinit function > when registering the opcode. > > > * insert_score_event_at_sample > > InsertScoreEvent > > > * GetInputArgCnt > > * GetInputArgName > > * GetOutputArgCnt > > All inline functions now > > > * hfgens > > FTCreate > > > cheers > > Eduardo >