def match_file(matcher, analyzer, ht, filename, hashList):
    """ Read in an audio file, calculate its landmarks, query against
        hash table.  Return top N matches as (id, filterdmatchcount,
        timeoffs, rawmatchcount), also length of input file in sec,
        and count of raw query hashes extracted
    """
    q_hashes = hashList
    # Fake durations as largest hash time
    if len(q_hashes) == 0:
        durd = 0.0
    else:
        durd = analyzer.n_hop * q_hashes[-1][0] / analyzer.target_sr
    
    # Run query
    rslts = matcher.match_hashes(ht, q_hashes)
    # Post filtering
    if matcher.sort_by_time:
        rslts = rslts[(-rslts[:, 2]).argsort(), :]
    return rslts[:matcher.max_returns, :], durd, len(q_hashes)