fix phasing edge case in delay line. make envelope computation more robust