Fix for a small problem in ov_read() which made the code rather unreadable, and was...
[platform/upstream/libvorbis.git] / lib / psy.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE.  *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5  * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE.    *
6  * PLEASE READ THESE TERMS DISTRIBUTING.                            *
7  *                                                                  *
8  * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000             *
9  * by Monty <monty@xiph.org> and The XIPHOPHORUS Company            *
10  * http://www.xiph.org/                                             *
11  *                                                                  *
12  ********************************************************************
13
14  function: random psychoacoustics (not including preecho)
15  last mod: $Id: psy.h,v 1.12 2000/05/08 20:49:49 xiphmont Exp $
16
17  ********************************************************************/
18
19 #ifndef _V_PSY_H_
20 #define _V_PSY_H_
21 #include "smallft.h"
22
23 #ifndef EHMER_MAX
24 #define EHMER_MAX 56
25 #endif
26
27 typedef struct {
28   int n;
29   struct vorbis_info_psy *vi;
30
31   double ***tonecurves;
32   double ***noisecurves;
33
34   double *ath;
35   int    *octave;
36
37 } vorbis_look_psy;
38
39 extern void   _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,int n,long rate);
40 extern void   _vp_psy_clear(vorbis_look_psy *p);
41 extern void  *_vi_psy_dup(void *source);
42 extern void   _vi_psy_free(vorbis_info_psy *i);
43 extern void   _vp_compute_mask(vorbis_look_psy *p,double *f, 
44                                double *floor,
45                                double *mask,
46                                double *decay);
47 extern void _vp_apply_floor(vorbis_look_psy *p,double *f,
48                             double *flr,double *mask);
49
50 #endif
51
52