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