Detect-It-Easy/db/Binary/audio_RIFF-IMA.1.sg
DosX 9e621e1954 Rename and reorganize rule files
Renamed and moved numerous .sg files in the db directory to follow a more consistent naming convention and directory structure, grouping by type (e.g., compiler, cruncher, packer, protector, etc.). This improves maintainability and clarity of the signature database organization.
2026-01-25 11:20:39 +03:00

22 lines
721 B
JavaScript

// Detect It Easy: detection rule file
// Author: Kae <TG@kaens>
// https://github.com/vgmstream/vgmstream/blob/master/src/meta/riff_ima.c
meta("audio", "Nintendo DS RIFF IMA-ADPCM stream (.STRM,.BIN,.LBIN)");
function detect() {
if (X.c("'RIFF'") && X.c("'IMA '", 8) && X.U32(0xC) && X.U32(4) >= 0x2D) {
bDetected = true;
if (X.isVerbose()) {
var ch = X.U32(0x24), len = Util.divu64((X.U32(4) - 0x2C) << 8, X.U16(0xC)) >> 8;
sOption(
'ch:' + ch + ' len ' + secondsToTimeStr(len) + ' s/r:' + X.U32(0xC) + 'Hz ' +
['not looped', 'looped'][+(X.U32(0x20) != 0)] + ' sz:' + outSz(X.U32(4))
);
}
}
return result();
}