Detect-It-Easy/db/Binary/audio_ACM.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

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();
}