BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsefirfilter.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_FIR_FILTER_H__
00003 #define __BSE_FIR_FILTER_H__
00004 
00005 #include <bse/bseplugin.hh>
00006 #include <bse/bsesource.hh>
00007 
00008 #ifdef __cplusplus
00009 extern "C" {
00010 #endif /* __cplusplus */
00011 
00012 
00013 
00014 
00015 
00016 /* --- object type macros --- */
00017 #define BSE_TYPE_FIR_FILTER              (type_id_fir_filter)
00018 #define BSE_FIR_FILTER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_FIR_FILTER, BseFIRFilter))
00019 #define BSE_FIR_FILTER_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_FIR_FILTER, BseFIRFilterClass))
00020 #define BSE_IS_FIR_FILTER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_FIR_FILTER))
00021 #define BSE_IS_FIR_FILTER_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_FIR_FILTER))
00022 #define BSE_FIR_FILTER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_FIR_FILTER, BseFIRFilterClass))
00023 
00024 struct BseFIRFilter : BseSource {
00025   guint16 degree;
00026   guint   filter_type : 8;
00027   guint   lanczos_smoothing : 1;
00028   guint   hann_smoothing : 1;
00029   gfloat  cut_off_freq;
00030   guint           n_coeffs;
00031   gfloat         *coeffs;
00032   guint           history_pos;
00033   BseSampleValue *history;
00034 };
00035 struct BseFIRFilterClass : BseSourceClass
00036 {};
00037 
00038 typedef enum
00039 {
00040   BSE_FIR_FILTER_ALLPASS,
00041   BSE_FIR_FILTER_LOWPASS,
00042   BSE_FIR_FILTER_HIGHPASS
00043 } BseFIRFilterType;
00044 
00045 enum
00046 {
00047   BSE_FIR_FILTER_OCHANNEL_NONE,
00048   BSE_FIR_FILTER_OCHANNEL_MONO
00049 };
00050 enum
00051 {
00052   BSE_FIR_FILTER_ICHANNEL_NONE,
00053   BSE_FIR_FILTER_ICHANNEL_MONO
00054 };
00055 
00056 
00057 
00058 
00059 #ifdef __cplusplus
00060 }
00061 #endif /* __cplusplus */
00062 
00063 #endif /* __BSE_FIR_FILTER_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines