Mercurial > hg > aim92
view 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 |
line wrap: on
line source
/* Copyright (c) Applied Psychology Unit, Medical Research Council. 1988, 1989 =========================================================================== Permission to use, copy, modify, and distribute this software without fee is hereby granted for research purposes, provided that this copyright notice appears in all copies and in all supporting documentation, and that the software is not redistributed for any fee (except for a nominal shipping charge). Anyone wanting to incorporate all or part of this software in a commercial product must obtain a license from the Medical Research Council. The MRC makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Acknowledgment: ============== The source code provided in this file was originally developed by Christian Giguere as part of a Ph.D degree at the Department of Engineering of the University of Cambridge from April 1990 to November 1993. The code was subsequently adapted under a grant from the Hearing Research Trust for full compatibility with AIM Release 6.15. Christian Giguere 25/03/94 */ /* =========================================================== wdf_ear.h =========================================================== Wave digital filter (WDF) implementation of the outer and middle ear (EAR) electroacoustic networks. Author : Christian Giguere First written : 01st July, 1991 Last edited : 17th February, 1994 =========================================================== */ #ifndef _WDF_EAR_H_ /***** defines *****/ #define _WDF_EAR_H_ /***** private data structures for WDF-EAR module *****/ typedef struct _wave_wdf_state WaveWDFstate ; typedef struct _eartube_wdf_state EartubeWDFstate ; typedef struct _earmiddle_wdf_state EarmiddleWDFstate ; struct _wave_wdf_state { double gamma01 ; /* WDF multiplier coefficients (Adaptors 0-2) */ double gamma11 ; double gamma21 ; int Nstates ; /* number of states stored */ char *states ; /* WDF state vector */ } ; struct _eartube_wdf_state { double gamma31 ; /* WDF multiplier coefficients (Adaptors 3-6) */ double gamma41 ; double gamma51 ; double gamma61 ; int Nstates ; /* number of states stored */ char *states ; /* WDF state vector */ } ; struct _earmiddle_wdf_state { double gamma71 ; /* WDF multiplier coefficients (Adaptors 7-22) */ double gamma81, gamma82 ; double gamma91, gamma92 ; double gamma101 ; double gamma111, gamma112 ; double gamma121 ; double gamma131 ; double gamma141 ; double gamma151 ; double gamma161 ; double gamma171, gamma172 ; double gamma181 ; double gamma191 ; double gamma201, gamma202 ; double gamma211, gamma212 ; double gamma221 ; double ratio ; /* transformer ratio between oval window and eardrum */ void (*update_proc)() ; /* procedure to update time-varying coeff gamma221 */ int Nstates ; /* number of states stored */ char *states ; /* WDF state vector */ double out_scale ; /* output gain */ } ; /***** externals *****/ extern WaveWDFstate *FreefieldWDF() ; extern EartubeWDFstate *EartubeWDF() ; extern EarmiddleWDFstate *EarmiddleWDF() ; extern void DoEarWDF(), CloseEarWDF() ; #endif