MCPcopy Create free account
hub / github.com/csound/csound / check_plugin_compatibility

Function check_plugin_compatibility

Top/csmodule.c:213–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213static int check_plugin_compatibility(CSOUND *csound, const char *fname, int n)
214{
215 int myfltSize, minorVersion, majorVersion;
216
217 myfltSize = n & 0xFF;
218 if (UNLIKELY(myfltSize != 0 && myfltSize != (int) sizeof(MYFLT))) {
219 csoundWarning(csound, Str("not loading '%s' (uses incompatible "
220 "floating point type)"), fname);
221 return -1;
222 }
223 if (UNLIKELY(n & (~0xFF))) {
224 minorVersion = (n & 0xFF00) >> 8;
225 majorVersion = (n & (~0xFFFF)) >> 16;
226 if (majorVersion != (int) CS_APIVERSION ||
227 (minorVersion > (int) CS_APISUBVER)) { /* NOTE **** REFACTOR *** */
228 csoundWarning(csound, Str("not loading '%s' (incompatible "
229 "with this version of Csound (%d.%d/%d.%d)"),
230 fname, majorVersion,minorVersion,
231 CS_APIVERSION,CS_APISUBVER);
232 return -1;
233 }
234 }
235 return 0;
236}
237
238
239/**

Callers 1

csoundLoadExternalFunction · 0.85

Calls 1

csoundWarningFunction · 0.85

Tested by

no test coverage detected