BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bseiirfilter.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BSE_IIR_FILTER_H__
00003 #define __BSE_IIR_FILTER_H__
00004 #include <bse/bsesource.hh>
00005 #ifdef __cplusplus
00006 extern "C" {
00007 #endif /* __cplusplus */
00008 
00009 #define BSE_TYPE_IIR_FILTER              (bse_iir_filter_get_type())
00010 #define BSE_IIR_FILTER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_IIR_FILTER, BseIIRFilter))
00011 #define BSE_IIR_FILTER_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_IIR_FILTER, BseIIRFilterClass))
00012 #define BSE_IS_IIR_FILTER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_IIR_FILTER))
00013 #define BSE_IS_IIR_FILTER_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_IIR_FILTER))
00014 #define BSE_IIR_FILTER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_IIR_FILTER, BseIIRFilterClass))
00015 #define BSE_IIR_FILTER_MAX_ORDER         (18)
00016 
00017 struct BseIIRFilterVars {
00018   gdouble a[BSE_IIR_FILTER_MAX_ORDER];
00019   gdouble b[BSE_IIR_FILTER_MAX_ORDER];
00020 };
00021 struct BseIIRFilter : BseSource {
00022   BseIIRFilterAlgorithm filter_algo;
00023   BseIIRFilterType      filter_type;
00024   guint                 algo_type_change : 1;
00025   guint         order;
00026   gdouble       epsilon;
00027   gfloat        cut_off_freq1;
00028   gfloat        cut_off_freq2;  /* band pass/stop */
00029   gdouble       a[BSE_IIR_FILTER_MAX_ORDER + 1];
00030   gdouble       b[BSE_IIR_FILTER_MAX_ORDER + 1];
00031 };
00032 struct BseIIRFilterClass : BseSourceClass
00033 {};
00034 
00035 enum
00036 {
00037   BSE_IIR_FILTER_ICHANNEL_MONO,
00038   BSE_IIR_FILTER_N_ICHANNELS
00039 };
00040 enum
00041 {
00042   BSE_IIR_FILTER_OCHANNEL_MONO,
00043   BSE_IIR_FILTER_N_OCHANNELS
00044 };
00045 
00046 #ifdef __cplusplus
00047 }
00048 #endif /* __cplusplus */
00049 #endif /* __BSE_IIR_FILTER_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines