// Detect It Easy: detection rule file
// Author: Kaens TG@kaens

meta("archive", "Arobas Music Guitar Pro 7+ soundbank (.gp7bank)");

function detect() {
    if (!X.c("'AMARCHIVE'..000000") ||
        !X.c("'Samples.xml'00", 0x25) ||
        !X.c("'<?xml'", X.U32(0x19)) ||
        X.U32(0x19) + X.U32(0x21) != X.U32(0x31) // ofs+sz of the xml = next ofs
    ) return false;

    bDetected = true; sVersion = 'v' + X.U8(9);

    if (X.isVerbose()) sOptions = X.U16(0xD) + ' samples';

    return result();
}