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.
21 lines
No EOL
720 B
JavaScript
21 lines
No EOL
720 B
JavaScript
// Detect It Easy: detection rule file
|
|
// Author: Kaens TG@kaens
|
|
|
|
meta("audio", "Interplay ACM waveform audio (.ACM)");
|
|
|
|
function detect() {
|
|
//from https://github.com/dtiefling/snd2acm-portable/blob/master/src/general.h
|
|
if (!File.compare("97280301") || File.getSize() < 0x10) return false;
|
|
var smp = File.read_uint32(4),
|
|
ch = File.read_uint16(8),
|
|
r = File.read_uint16(0xA);
|
|
|
|
if (!smp || !isWithin(ch, 1, 2) || !isWithin(r, 6000, 49716)) return false;
|
|
bDetected = true;
|
|
if (Binary.isVerbose()) {
|
|
var sr = (r / 1000).toFixed(1);
|
|
sOption('ch: ' + ch + ' s/r: ' + sr + 'kHz len: ' + secondsToTimeStr(Util.divu64(smp + (r >> 1), r * ch)));
|
|
}
|
|
|
|
return result();
|
|
} |