equalize.h

来自「Fax and soft modem source code. - Slow m」· C头文件 代码 · 共 22 行

H
22
字号
struct equalizer
  { equalizer(float d)		  { delta = d; reset(); }
    void reset();
    void insert(complex);				  /* put new raw value into equalizer		    */
    complex get();					  /* get equalized value			    */
    void update(complex eps)	   { upd(eps, np); }	  /* given eps, update coeffs			    */
    void short_update(complex eps) { upd(eps, 2);  }	  /* ditto, use short window	// WAS 1	    */
    int getdt();					  /* get timing offset				    */
    void shift(int);					  /* shift coefficients vector			    */
    void print(char*);					  /* print coefficients vector			    */

private:
    void upd(complex, int);
    const int size = 16;				  /* power of 2 .ge. (2*np+1)			    */
    const int np = 7;					  /* np to the left of me, np to the right of me    */
    complex coeffs[2*np+1];				  /* vector of coefficients			    */
    complex in[size];					  /* circular buffer				    */
    int next;						  /* ptr to next place to insert		    */
    float delta;
  };

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?