You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think about writting C++ wrapper around C version. However, it looks like C version use global variables and can have only one state.
I suggest making it in pseudo-OOP way, like
struct micromod_obj {
signed char *module_data;
…
}
long micromod_initialise_obj( struct micromod_obj obj, signed char *data, long sampling_rate );
and so on. You can keep compatiblity by declaring static struct micromod_obj micromod_instance; and making exsiting functions just wrappers around it, like:
long micromod_initialise( signed char *data, long sampling_rate ) {
return micromod_initialise_obj( micromod_instance, data, sampling_rate );
}
What do you think? I'll try to do it myself meanwhile.
The text was updated successfully, but these errors were encountered:
I think about writting C++ wrapper around C version. However, it looks like C version use global variables and can have only one state.
I suggest making it in pseudo-OOP way, like
and so on. You can keep compatiblity by declaring
static struct micromod_obj micromod_instance;
and making exsiting functions just wrappers around it, like:What do you think? I'll try to do it myself meanwhile.
The text was updated successfully, but these errors were encountered: