Vuo
2.3.2
node
vuo.bcf2000
VuoScribbleStrip.c
Go to the documentation of this file.
1
10
#include "
VuoScribbleStrip.h
"
11
12
#include "
module.h
"
13
14
#ifdef VUO_COMPILER
15
VuoModuleMetadata
({
16
"title"
:
"VuoScribbleStrip"
,
17
"dependencies"
: [
18
]
19
});
20
#endif
21
22
#define VuoScribbleStrip_channels 8
23
#define VuoScribbleStrip_sections VuoScribbleStrip_Faders + 1
24
#define VuoScribbleStrip_maxTextLength 25
25
26
static
char
VuoScribbleStrip_text
[
VuoScribbleStrip_channels
][
VuoScribbleStrip_sections
][
VuoScribbleStrip_maxTextLength
];
27
31
static
void
__attribute__((constructor)) VuoScribbleStrip_init(
void
)
32
{
33
// VuoScribbleStrip_text = (char *)calloc(1, VuoScribbleStrip_sections * VuoScribbleStrip_channels * VuoScribbleStrip_maxTextLength + 1);
34
}
35
39
void
VuoScribbleStrip_set
(
VuoScribbleStripSection
section,
VuoInteger
channel,
VuoText
text)
40
{
41
if
(!text)
42
{
43
VuoScribbleStrip_text
[channel][section][0] = 0;
44
return
;
45
}
46
47
strncpy(
VuoScribbleStrip_text
[channel][section],
48
text,
49
VuoScribbleStrip_maxTextLength
- 1);
// Leave room for the null terminator.
50
}
51
55
VuoText
VuoScribbleStrip_get
(
VuoScribbleStripSection
section,
VuoInteger
channel)
56
{
57
return
VuoText_makeWithMaxLength
(
VuoScribbleStrip_text
[channel][section],
VuoScribbleStrip_maxTextLength
);
58
}
Generated on Sat Jun 19 2021 10:17:45 for Vuo by
1.9.1