/* add a user effect to the spec list */ public static void AddUserEffectToEffectSpecList( EffectSpecListRec EffectSpecList, UserEffectSpecRec UserEffectSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eUserEffect, UserEffectSpec, EnabledFlag); }
/* add an ideal lowpass filter to the spec list */ public static void AddIdealLPToEffectSpecList( EffectSpecListRec EffectSpecList, IdealLPSpecRec IdealLPSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eIdealLowpassEffect, IdealLPSpec, EnabledFlag); }
/* add a convolver to the spec list */ public static void AddConvolverToEffectSpecList( EffectSpecListRec EffectSpecList, ConvolverSpecRec ConvolverSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eConvolverEffect, ConvolverSpec, EnabledFlag); }
/* add a resampler to the spec list */ public static void AddResamplerToEffectSpecList( EffectSpecListRec EffectSpecList, ResamplerSpecRec ResamplerSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eResamplerEffect, ResamplerSpec, EnabledFlag); }
/* add a vocoder to the spec list */ public static void AddVocoderToEffectSpecList( EffectSpecListRec EffectSpecList, VocoderSpecRec VocSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eVocoderEffect, VocSpec, EnabledFlag); }
/* add an histogram to the spec list */ public static void AddHistogramToEffectSpecList( EffectSpecListRec EffectSpecList, HistogramSpecRec HistogramSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eHistogramEffect, HistogramSpec, EnabledFlag); }
/* add an analyzer to the spec list */ public static void AddAnalyzerToEffectSpecList( EffectSpecListRec EffectSpecList, AnalyzerSpecRec AnalyzerSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eAnalyzerEffect, AnalyzerSpec, EnabledFlag); }
/* add a parallel filter array to the spec list */ public static void AddFilterToEffectSpecList( EffectSpecListRec EffectSpecList, FilterSpecRec FilterSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eFilterEffect, FilterSpec, EnabledFlag); }
/* add a user effect to the spec list */ public static void AddPluggableEffectToEffectSpecList( EffectSpecListRec EffectSpecList, PluggableSpec PluggableEffectSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.ePluggableEffect, PluggableEffectSpec, EnabledFlag); }
private static void AddGenericToEffectSpecList( EffectSpecListRec EffectSpecList, EffectTypes Type, object GenericSpec, bool EnabledFlag) { #if DEBUG if (!(((GenericSpec is DelayEffectRec) && (Type == EffectTypes.eDelayEffect)) || ((GenericSpec is NonlinProcSpecRec) && (Type == EffectTypes.eNLProcEffect)) || ((GenericSpec is FilterSpecRec) && (Type == EffectTypes.eFilterEffect)) || ((GenericSpec is AnalyzerSpecRec) && (Type == EffectTypes.eAnalyzerEffect)) || ((GenericSpec is HistogramSpecRec) && (Type == EffectTypes.eHistogramEffect)) || ((GenericSpec is ResamplerSpecRec) && (Type == EffectTypes.eResamplerEffect)) || ((GenericSpec is CompressorSpecRec) && (Type == EffectTypes.eCompressorEffect)) || ((GenericSpec is VocoderSpecRec) && (Type == EffectTypes.eVocoderEffect)) || ((GenericSpec is IdealLPSpecRec) && (Type == EffectTypes.eIdealLowpassEffect)) || ((GenericSpec is ConvolverSpecRec) && (Type == EffectTypes.eConvolverEffect)) || ((GenericSpec is UserEffectSpecRec) && (Type == EffectTypes.eUserEffect)) || ((GenericSpec is PluggableSpec) && (Type == EffectTypes.ePluggableEffect)))) { Debug.Assert(false); throw new ArgumentException(); } #endif EffectNodeRec Effect = new EffectNodeRec(); Effect.Type = Type; Effect.u = GenericSpec; Effect.EnabledFlag = EnabledFlag; Array.Resize(ref EffectSpecList.List, EffectSpecList.List.Length + 1); EffectSpecList.List[EffectSpecList.List.Length - 1] = Effect; }
/* add a delay effect to the spec list */ public static void AddDelayToEffectSpecList( EffectSpecListRec EffectSpecList, DelayEffectRec DelaySpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eDelayEffect, DelaySpec, EnabledFlag); }
/* add a nonlinear processor to the spec list */ public static void AddNLProcToEffectSpecList( EffectSpecListRec EffectSpecList, NonlinProcSpecRec NLProcSpec, bool EnabledFlag) { AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eNLProcEffect, NLProcSpec, EnabledFlag); }
/* create a new effect list */ public static EffectSpecListRec NewEffectSpecList() { EffectSpecListRec EffectSpecList = new EffectSpecListRec(); EffectSpecList.List = new EffectNodeRec[0]; //EffectSpecList.AutoQuiescenceEnabled = false; //EffectSpecList.SuppressInitialSilence = false; return(EffectSpecList); }
/* get print-report flag for auto-quiescence */ public static bool EffectSpecListGetAutoQuiescencePrintReport(EffectSpecListRec EffectSpecList) { #if DEBUG if (!EffectSpecList.AutoQuiescenceEnabled) { Debug.Assert(false); throw new ArgumentException(); } #endif return(EffectSpecList.PrintReport); }
/* get window duration for auto-quiescence */ public static double EffectSpecListGetAutoQuiescenceWindowDuration(EffectSpecListRec EffectSpecList) { #if DEBUG if (!EffectSpecList.AutoQuiescenceEnabled) { Debug.Assert(false); throw new ArgumentException(); } #endif return(EffectSpecList.WindowDuration); }
public static int GetEffectSpecListEnabledLength(EffectSpecListRec EffectSpecList) { int count = 0; for (int i = 0; i < EffectSpecList.List.Length; i++) { if (IsEffectFromEffectSpecListEnabled(EffectSpecList, i)) { count++; } } return(count); }
public static T GetGenericEffectFromEffectSpecList <T>( EffectSpecListRec EffectSpecList, int Index, EffectTypes Type) { #if DEBUG if ((EffectSpecList.List[Index].Type != Type) || !(EffectSpecList.List[Index].u is T)) { Debug.Assert(false); throw new ArgumentException(); } #endif return((T)EffectSpecList.List[Index].u); }
/* enable automatic quiescence detection */ public static void EffectSpecListEnableAutoQuiescence( EffectSpecListRec EffectSpecList, double Decibels, double WindowDuration, bool PrintReport) { #if DEBUG if (Decibels < 0) { Debug.Assert(false); throw new ArgumentException(); } if (WindowDuration < 0) { Debug.Assert(false); throw new ArgumentException(); } #endif EffectSpecList.AutoQuiescenceEnabled = true; EffectSpecList.Decibels = Decibels; EffectSpecList.WindowDuration = WindowDuration; EffectSpecList.PrintReport = PrintReport; }
/* query is auto-quiescence enabled */ public static bool EffectSpecListIsAutoQuiescenceEnabled(EffectSpecListRec EffectSpecList) { return(EffectSpecList.AutoQuiescenceEnabled); }
/* find out if specified effect is enabled */ public static bool IsEffectFromEffectSpecListEnabled( EffectSpecListRec EffectSpecList, int Index) { return(EffectSpecList.List[Index].EnabledFlag); }
/* get the convolver from the specified index */ public static ConvolverSpecRec GetConvolverEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <ConvolverSpecRec>(EffectSpecList, Index, EffectTypes.eConvolverEffect)); }
/* get the ideal lowpass filter from the specified index */ public static IdealLPSpecRec GetIdealLPEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <IdealLPSpecRec>(EffectSpecList, Index, EffectTypes.eIdealLowpassEffect)); }
/* get the vocoder from the specified index */ public static VocoderSpecRec GetVocoderEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <VocoderSpecRec>(EffectSpecList, Index, EffectTypes.eVocoderEffect)); }
public static HistogramSpecRec GetHistogramEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <HistogramSpecRec>(EffectSpecList, Index, EffectTypes.eHistogramEffect)); }
public static AnalyzerSpecRec GetAnalyzerEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <AnalyzerSpecRec>(EffectSpecList, Index, EffectTypes.eAnalyzerEffect)); }
/* set flag for suppressing initial silence (score effect only) */ public static void EffectSpecListPutSuppressInitialSilence( EffectSpecListRec EffectSpecList, bool Suppress) { EffectSpecList.SuppressInitialSilence = Suppress; }
/* get flag for suppressing initial silence (score effect only) */ public static bool EffectSpecListGetSuppressInitialSilence(EffectSpecListRec EffectSpecList) { return(EffectSpecList.SuppressInitialSilence); }
/* get the user effect from the specified index */ public static UserEffectSpecRec GetUserEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <UserEffectSpecRec>(EffectSpecList, Index, EffectTypes.eUserEffect)); }
public static ResamplerSpecRec GetResamplerEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <ResamplerSpecRec>(EffectSpecList, Index, EffectTypes.eResamplerEffect)); }
public static PluggableSpec GetPluggableEffectFromEffectSpecList( EffectSpecListRec EffectSpecList, int Index) { return(GetGenericEffectFromEffectSpecList <PluggableSpec>(EffectSpecList, Index, EffectTypes.ePluggableEffect)); }