summaryrefslogtreecommitdiffstats
path: root/Src/Plugins/Input/in_vorbis/shaper.h
blob: 13da7fd26f0ed91512b7853ecaf2b0a8de0bc838 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//from SSRC
#ifndef NULLSOFT_VORBIS_SHAPER_H
#define NULLSOFT_VORBIS_SHAPER_H
#include "main.h"

typedef float REAL;
enum
{
	DITHER_RECTANGLE=0,
	DITHER_TRIANGLE=1,
	DITHER_GAUSSIAN=2,
};
class Shaper
{
	double **shapebuf;
	int shaper_type,shaper_len,shaper_clipmin,shaper_clipmax;
	REAL *randbuf;
	int randptr;
	int dtype;
	int nch;

  public:
	Shaper(int freq,int _nch,int min,int max,int _dtype,int pdf,double noiseamp);

	int do_shaping(double s,/*double *peak,*/int ch);

	~Shaper();
};

#endif