charptr32 filename
bool32.rising Trigger to read file size
int32.positive Filesize in 16 bit samples
int32_t start_sequence;
int32_t old_inlet_trig;
int32_t file_size;
start_sequence = 0;
if (start_sequence == 0 || inlet_trig != 0 && old_inlet_trig == 0) {
FIL FileObject;
int32_t err;
err = f_open(&FileObject, inlet_filename, FA_READ);
if (err != FR_OK) {
report_fatfs_error(err, inlet_filename);
file_size = 0;
} else {
file_size = f_size(&FileObject) >> 1;
f_close(&FileObject);
}
if (start_sequence == 0) {
start_sequence++;
}
}
old_inlet_trig = inlet_trig;
outlet_samples = file_size;