| 211 | } |
| 212 | |
| 213 | static 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 | /** |
no test coverage detected