comparison wdf/wdf_ear.h @ 0:5242703e91d3 tip

Initial checkin for AIM92 aimR8.2 (last updated May 1997).
author tomwalters
date Fri, 20 May 2011 15:19:45 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5242703e91d3
1 /*
2 Copyright (c) Applied Psychology Unit, Medical Research Council. 1988, 1989
3 ===========================================================================
4
5 Permission to use, copy, modify, and distribute this software without fee
6 is hereby granted for research purposes, provided that this copyright
7 notice appears in all copies and in all supporting documentation, and that
8 the software is not redistributed for any fee (except for a nominal shipping
9 charge). Anyone wanting to incorporate all or part of this software in a
10 commercial product must obtain a license from the Medical Research Council.
11
12 The MRC makes no representations about the suitability of this
13 software for any purpose. It is provided "as is" without express or implied
14 warranty.
15
16 THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
17 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE
18 A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
19 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
20 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
21 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 */
23
24 /*
25 Acknowledgment:
26 ==============
27
28 The source code provided in this file was originally developed by
29 Christian Giguere as part of a Ph.D degree at the Department of
30 Engineering of the University of Cambridge from April 1990 to
31 November 1993. The code was subsequently adapted under a grant
32 from the Hearing Research Trust for full compatibility with
33 AIM Release 6.15.
34
35 Christian Giguere 25/03/94
36
37 */
38
39 /*
40 ===========================================================
41 wdf_ear.h
42 ===========================================================
43
44 Wave digital filter (WDF) implementation of the outer and
45 middle ear (EAR) electroacoustic networks.
46
47 Author : Christian Giguere
48 First written : 01st July, 1991
49 Last edited : 17th February, 1994
50 ===========================================================
51 */
52
53 #ifndef _WDF_EAR_H_
54
55
56 /***** defines *****/
57
58 #define _WDF_EAR_H_
59
60
61 /***** private data structures for WDF-EAR module *****/
62
63 typedef struct _wave_wdf_state WaveWDFstate ;
64 typedef struct _eartube_wdf_state EartubeWDFstate ;
65 typedef struct _earmiddle_wdf_state EarmiddleWDFstate ;
66
67 struct _wave_wdf_state {
68 double gamma01 ; /* WDF multiplier coefficients (Adaptors 0-2) */
69 double gamma11 ;
70 double gamma21 ;
71 int Nstates ; /* number of states stored */
72 char *states ; /* WDF state vector */
73 } ;
74
75 struct _eartube_wdf_state {
76 double gamma31 ; /* WDF multiplier coefficients (Adaptors 3-6) */
77 double gamma41 ;
78 double gamma51 ;
79 double gamma61 ;
80 int Nstates ; /* number of states stored */
81 char *states ; /* WDF state vector */
82 } ;
83
84 struct _earmiddle_wdf_state {
85 double gamma71 ; /* WDF multiplier coefficients (Adaptors 7-22) */
86 double gamma81, gamma82 ;
87 double gamma91, gamma92 ;
88 double gamma101 ;
89 double gamma111, gamma112 ;
90 double gamma121 ;
91 double gamma131 ;
92 double gamma141 ;
93 double gamma151 ;
94 double gamma161 ;
95 double gamma171, gamma172 ;
96 double gamma181 ;
97 double gamma191 ;
98 double gamma201, gamma202 ;
99 double gamma211, gamma212 ;
100 double gamma221 ;
101 double ratio ; /* transformer ratio between oval window and eardrum */
102 void (*update_proc)() ; /* procedure to update time-varying coeff gamma221 */
103 int Nstates ; /* number of states stored */
104 char *states ; /* WDF state vector */
105 double out_scale ; /* output gain */
106 } ;
107
108
109 /***** externals *****/
110
111 extern WaveWDFstate *FreefieldWDF() ;
112 extern EartubeWDFstate *EartubeWDF() ;
113 extern EarmiddleWDFstate *EarmiddleWDF() ;
114 extern void DoEarWDF(), CloseEarWDF() ;
115
116 #endif
117