INNER CODE UNIT · C
data
1oom-fork/1oom · src/fmt_mus.c:395
data = lib_malloc(HDR_MIDI_LEN + len_evnt * 2);
{
uint8_t hdr[] = {
/*00*/ 'M', 'T', 'h', 'd',
/*04*/ 0, 0, 0, 6,
/*08*/ 0, 0, 0, 1,
/*0c*/ (XMID_TICKSPERQ >> 8) & 0xff, XMID_TICKSPERQ & 0xff,
/*0e*/ 'M', 'T', 'r', 'k'
/*12*/ /* length, big endian */
};
memcpy(data, hdr, sizeof(hdr));
}
len = xmid_convert_evnt(data_in, len_evnt, timbre_tbl, timbre_num, &data[HDR_MIDI_LEN], tune_loops);
LOG_DEBUG((DEBUGLEVEL_FMTMUS, "XMID: lene %i len %i (%f) %s\n", len_evnt, len, (double)len / (double)len_evnt, *tune_loops ? "loop" : "once"));
if (len < 0) {
goto fail;
}