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

Function Framebuffer_getArgumentType

Opcodes/framebuffer.c:388–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388ArgumentType Framebuffer_getArgumentType(CSOUND *csound, MYFLT *argument)
389{
390 const CS_TYPE *csoundType = csound->GetTypeForArg((void *)argument);
391 const char *type = csoundType->varTypeName;
392 ArgumentType argumentType = UNKNOWN;
393
394 if (strcmp("S", type) == 0) {
395
396 argumentType = STRING_VAR;
397 }
398 else if (strcmp("a", type) == 0) {
399
400 argumentType = ARATE_VAR;
401 }
402 else if (strcmp("k", type) == 0) {
403
404 argumentType = KRATE_VAR;
405 }
406 else if (strcmp("i", type) == 0) {
407
408 argumentType = IRATE_VAR;
409 }
410 else if (strcmp("[", type) == 0) {
411
412 ARRAYDAT *array = (ARRAYDAT *)argument;
413
414 if (strcmp("k", array->arrayType->varTypeName) == 0) {
415
416 argumentType = KRATE_ARRAY;
417 }
418 else if (strcmp("a", array->arrayType->varTypeName) == 0) {
419
420 argumentType = ARATE_ARRAY;
421 }
422 else if (strcmp("i", array->arrayType->varTypeName) == 0) {
423
424 argumentType = IRATE_ARRAY;
425 }
426 }
427
428 return argumentType;
429}
430
431static OENTRY framebuffer_localops[] = {
432

Callers 1

Framebuffer_initialiseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected