Piotr Gregor c9d027ea91 FS-8875 Enable faster beep detection
Unnecessary computation of arc cosine is omitted
and convergence is checked on partial results.
Original frequency is easily retrieved when needed.
2016-03-29 23:41:13 +01:00

10 lines
231 B
C

#ifndef __AVMD_PSI_H__
#define __AVMD_PSI_H__
#include "avmd_buffer.h"
#define PSI(b, i) (GET_SAMPLE((b), ((i) + 1))*GET_SAMPLE((b), ((i) + 1))-GET_SAMPLE((b), ((i) + 2))*GET_SAMPLE((b), ((i) + 0)))
#endif /* __AVMD_PSI_H__ */