IO Variants: 2
Variant: 1
int32.positive getIndex
charptr32 filter
charptr32 NameFlt
charptr32 NameRaw
bool32.pulse trig
objref SDapi
combo directory
int prev;
char outflt [16];
char outraw [16];
uint8_t thin;
//browse
outlet_trig = 0;
if ((inlet_getIndex != prev)&& !thin){
prev = inlet_getIndex;
if (attr_directory) attr_SDapi.getdir ("/",inlet_filter,prev);
else attr_SDapi.getdir ("",inlet_filter,prev);
if (strlen(attr_SDapi.fname_flt)){
outlet_trig = 1;
strcpy (outflt,attr_SDapi.fname_flt);
strcpy (outraw,attr_SDapi.fname_raw);
}
}
outlet_NameFlt = &outflt[0];
outlet_NameRaw = &outraw[0];
thin ++;
Variant: 2
int32.positive getIndex
charptr32 filter
charptr32 name
bool32.pulse trig
objref SDapi
combo directory
spinner thin
int prev;
uint8_t thin;
// browse
outlet_trig = 0;
if ((inlet_getIndex != prev) && !thin) {
prev = inlet_getIndex;
if (!attr_directory)
attr_SDapi.getdir("/", inlet_filter, prev);
else
attr_SDapi.getdir("", inlet_filter, prev);
if (strlen(attr_SDapi.fname_flt))
outlet_trig = 1;
}
thin++;
thin = thin % attr_thin;
outlet_name = &attr_SDapi.fname_flt[0];