mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
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.
22 lines
721 B
JavaScript
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();
|
|
}
|