Ejemplo n.º 1
0
 /* add a user effect to the spec list */
 public static void AddUserEffectToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     UserEffectSpecRec UserEffectSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eUserEffect, UserEffectSpec, EnabledFlag);
 }
Ejemplo n.º 2
0
 /* 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);
 }
Ejemplo n.º 3
0
 /* add a convolver to the spec list */
 public static void AddConvolverToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     ConvolverSpecRec ConvolverSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eConvolverEffect, ConvolverSpec, EnabledFlag);
 }
Ejemplo n.º 4
0
 /* add a resampler to the spec list */
 public static void AddResamplerToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     ResamplerSpecRec ResamplerSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eResamplerEffect, ResamplerSpec, EnabledFlag);
 }
Ejemplo n.º 5
0
 /* add a vocoder to the spec list */
 public static void AddVocoderToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     VocoderSpecRec VocSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eVocoderEffect, VocSpec, EnabledFlag);
 }
Ejemplo n.º 6
0
 /* add an histogram to the spec list */
 public static void AddHistogramToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     HistogramSpecRec HistogramSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eHistogramEffect, HistogramSpec, EnabledFlag);
 }
Ejemplo n.º 7
0
 /* add an analyzer to the spec list */
 public static void AddAnalyzerToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     AnalyzerSpecRec AnalyzerSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eAnalyzerEffect, AnalyzerSpec, EnabledFlag);
 }
Ejemplo n.º 8
0
 /* 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);
 }
Ejemplo n.º 9
0
 /* add a user effect to the spec list */
 public static void AddPluggableEffectToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     PluggableSpec PluggableEffectSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.ePluggableEffect, PluggableEffectSpec, EnabledFlag);
 }
Ejemplo n.º 10
0
        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;
        }
Ejemplo n.º 11
0
 /* add a delay effect to the spec list */
 public static void AddDelayToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     DelayEffectRec DelaySpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eDelayEffect, DelaySpec, EnabledFlag);
 }
Ejemplo n.º 12
0
 /* add a nonlinear processor to the spec list */
 public static void AddNLProcToEffectSpecList(
     EffectSpecListRec EffectSpecList,
     NonlinProcSpecRec NLProcSpec,
     bool EnabledFlag)
 {
     AddGenericToEffectSpecList(EffectSpecList, EffectTypes.eNLProcEffect, NLProcSpec, EnabledFlag);
 }
Ejemplo n.º 13
0
        /* 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);
        }
Ejemplo n.º 14
0
        /* 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);
        }
Ejemplo n.º 15
0
        /* 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);
        }
Ejemplo n.º 16
0
        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);
        }
Ejemplo n.º 17
0
        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);
        }
Ejemplo n.º 18
0
        /* 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;
        }
Ejemplo n.º 19
0
 /* query is auto-quiescence enabled */
 public static bool EffectSpecListIsAutoQuiescenceEnabled(EffectSpecListRec EffectSpecList)
 {
     return(EffectSpecList.AutoQuiescenceEnabled);
 }
Ejemplo n.º 20
0
 /* find out if specified effect is enabled */
 public static bool IsEffectFromEffectSpecListEnabled(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(EffectSpecList.List[Index].EnabledFlag);
 }
Ejemplo n.º 21
0
 /* get the convolver from the specified index */
 public static ConvolverSpecRec GetConvolverEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <ConvolverSpecRec>(EffectSpecList, Index, EffectTypes.eConvolverEffect));
 }
Ejemplo n.º 22
0
 /* get the ideal lowpass filter from the specified index */
 public static IdealLPSpecRec GetIdealLPEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <IdealLPSpecRec>(EffectSpecList, Index, EffectTypes.eIdealLowpassEffect));
 }
Ejemplo n.º 23
0
 /* get the vocoder from the specified index */
 public static VocoderSpecRec GetVocoderEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <VocoderSpecRec>(EffectSpecList, Index, EffectTypes.eVocoderEffect));
 }
Ejemplo n.º 24
0
 public static HistogramSpecRec GetHistogramEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <HistogramSpecRec>(EffectSpecList, Index, EffectTypes.eHistogramEffect));
 }
Ejemplo n.º 25
0
 public static AnalyzerSpecRec GetAnalyzerEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <AnalyzerSpecRec>(EffectSpecList, Index, EffectTypes.eAnalyzerEffect));
 }
Ejemplo n.º 26
0
 /* set flag for suppressing initial silence (score effect only) */
 public static void EffectSpecListPutSuppressInitialSilence(
     EffectSpecListRec EffectSpecList,
     bool Suppress)
 {
     EffectSpecList.SuppressInitialSilence = Suppress;
 }
Ejemplo n.º 27
0
 /* get flag for suppressing initial silence (score effect only) */
 public static bool EffectSpecListGetSuppressInitialSilence(EffectSpecListRec EffectSpecList)
 {
     return(EffectSpecList.SuppressInitialSilence);
 }
Ejemplo n.º 28
0
 /* get the user effect from the specified index */
 public static UserEffectSpecRec GetUserEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <UserEffectSpecRec>(EffectSpecList, Index, EffectTypes.eUserEffect));
 }
Ejemplo n.º 29
0
 public static ResamplerSpecRec GetResamplerEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <ResamplerSpecRec>(EffectSpecList, Index, EffectTypes.eResamplerEffect));
 }
Ejemplo n.º 30
0
 public static PluggableSpec GetPluggableEffectFromEffectSpecList(
     EffectSpecListRec EffectSpecList,
     int Index)
 {
     return(GetGenericEffectFromEffectSpecList <PluggableSpec>(EffectSpecList, Index, EffectTypes.ePluggableEffect));
 }