Exemplo n.º 1
0
 /// <summary>
 /// deprecated Accumulating process mode is deprecated in VST 2.4! Use AEffect::processReplacing instead!
 /// </summary>
 public void __ProcessDeprecated( IntPtr inputs, IntPtr outputs, VstInt32 sampleFrames ) {
     if ( processProc == null && aeffect.__processDeprecated != IntPtr.Zero ) {
         processProc = (AEffectProcessProc)Marshal.GetDelegateForFunctionPointer( aeffect.__processDeprecated, typeof( AEffectProcessProc ) );
     }
     try {
         if ( processProc != null ) {
             processProc( ref aeffect, inputs, outputs, sampleFrames );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#__ProcessDeprecated; ex=" + ex );
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Process double-precision audio samples in replacing mode @see AudioEffect::processDoubleReplacing
 /// </summary>
 /// <param name="inputs"></param>
 /// <param name="outputs"></param>
 /// <param name="sampleFrames"></param>
 public void ProcessDoubleReplacing( IntPtr inputs, IntPtr outputs, VstInt32 sampleFrames ) {
     if ( processDoubleReplacingProc == null && aeffect.processDoubleReplacing != IntPtr.Zero ) {
         processDoubleReplacingProc = (AEffectProcessDoubleProc)Marshal.GetDelegateForFunctionPointer( aeffect.processDoubleReplacing, typeof( AEffectProcessDoubleProc ) );
     }
     try {
         if ( processDoubleReplacingProc != null ) {
             processDoubleReplacingProc( ref aeffect, inputs, outputs, sampleFrames );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#ProcessDoubleReplacing; ex=" + ex );
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Set new value of automatable parameter @see AudioEffect::setParameter
 /// </summary>
 public void SetParameter( VstInt32 index, float parameter ) {
     if ( setParameterProc == null && aeffect.setParameter != IntPtr.Zero ) {
         setParameterProc = (AEffectSetParameterProc)Marshal.GetDelegateForFunctionPointer( aeffect.setParameter, typeof( AEffectSetParameterProc ) );
     }
     try {
         if ( setParameterProc != null ) {
             setParameterProc( ref aeffect, index, parameter );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#SetParameter; ex=" + ex );
     }
 }
        protected virtual VstIntPtr AudioMaster(ref AEffect effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, IntPtr ptr, float opt)
        {
            VstIntPtr result = 0;

            switch (opcode)
            {
            case AudioMasterOpcodes.audioMasterVersion: {
                result = Constants.kVstVersion;
                break;
            }
            }
            return(result);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Returns current value of automatable parameter @see AudioEffect::getParameter
 /// </summary>
 public float GetParameter( VstInt32 index ) {
     if ( getParameterProc == null && aeffect.getParameter != IntPtr.Zero ) {
         getParameterProc = (AEffectGetParameterProc)Marshal.GetDelegateForFunctionPointer( aeffect.getParameter, typeof( AEffectGetParameterProc ) );
     }
     float ret = 0.0f;
     try {
         if ( getParameterProc != null ) {
             ret = getParameterProc( ref aeffect, index );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#GetParameter; ex=" + ex );
     }
     return ret;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Host to Plug-in dispatcher @see AudioEffect::dispatcher
 /// </summary>
 public VstIntPtr Dispatch( VstInt32 opcode, VstInt32 index, VstIntPtr value, IntPtr ptr, float opt ) {
     if ( dispatcherProc == null && aeffect.dispatcher != IntPtr.Zero ) {
         dispatcherProc = (AEffectDispatcherProc)Marshal.GetDelegateForFunctionPointer( aeffect.dispatcher, typeof( AEffectDispatcherProc ) );
     }
     VstIntPtr ret = 0;
     try {
         if ( dispatcherProc != null ) {
             ret = dispatcherProc( ref aeffect, opcode, index, value, ptr, opt );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffectWrapper#Dispatch; ex=" + ex );
     }
     return ret;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Process double-precision audio samples in replacing mode @see AudioEffect::processDoubleReplacing
 /// </summary>
 /// <param name="inputs"></param>
 /// <param name="outputs"></param>
 /// <param name="sampleFrames"></param>
 public void ProcessDoubleReplacing( IntPtr inputs, IntPtr outputs, VstInt32 sampleFrames ) {
     if ( processDoubleReplacingProc == null && aeffect.processDoubleReplacing != IntPtr.Zero ) {
         processDoubleReplacingProc = (AEffectProcessDoubleProc)Marshal.GetDelegateForFunctionPointer( aeffect.processDoubleReplacing, typeof( AEffectProcessDoubleProc ) );
     }
     try {
         if ( processDoubleReplacingProc != null ) {
             processDoubleReplacingProc( ref aeffect, inputs, outputs, sampleFrames );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#ProcessDoubleReplacing; ex=" + ex );
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Returns current value of automatable parameter @see AudioEffect::getParameter
 /// </summary>
 public float GetParameter( VstInt32 index ) {
     if ( getParameterProc == null && aeffect.getParameter != IntPtr.Zero ) {
         getParameterProc = (AEffectGetParameterProc)Marshal.GetDelegateForFunctionPointer( aeffect.getParameter, typeof( AEffectGetParameterProc ) );
     }
     float ret = 0.0f;
     try {
         if ( getParameterProc != null ) {
             ret = getParameterProc( ref aeffect, index );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#GetParameter; ex=" + ex );
     }
     return ret;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Set new value of automatable parameter @see AudioEffect::setParameter
 /// </summary>
 public void SetParameter( VstInt32 index, float parameter ) {
     if ( setParameterProc == null && aeffect.setParameter != IntPtr.Zero ) {
         setParameterProc = (AEffectSetParameterProc)Marshal.GetDelegateForFunctionPointer( aeffect.setParameter, typeof( AEffectSetParameterProc ) );
     }
     try {
         if ( setParameterProc != null ) {
             setParameterProc( ref aeffect, index, parameter );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#SetParameter; ex=" + ex );
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// deprecated Accumulating process mode is deprecated in VST 2.4! Use AEffect::processReplacing instead!
 /// </summary>
 public void __ProcessDeprecated( IntPtr inputs, IntPtr outputs, VstInt32 sampleFrames ) {
     if ( processProc == null && aeffect.__processDeprecated != IntPtr.Zero ) {
         processProc = (AEffectProcessProc)Marshal.GetDelegateForFunctionPointer( aeffect.__processDeprecated, typeof( AEffectProcessProc ) );
     }
     try {
         if ( processProc != null ) {
             processProc( ref aeffect, inputs, outputs, sampleFrames );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffect#__ProcessDeprecated; ex=" + ex );
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// Host to Plug-in dispatcher @see AudioEffect::dispatcher
 /// </summary>
 public VstIntPtr Dispatch( VstInt32 opcode, VstInt32 index, VstIntPtr value, IntPtr ptr, float opt ) {
     if ( dispatcherProc == null && aeffect.dispatcher != IntPtr.Zero ) {
         dispatcherProc = (AEffectDispatcherProc)Marshal.GetDelegateForFunctionPointer( aeffect.dispatcher, typeof( AEffectDispatcherProc ) );
     }
     VstIntPtr ret = 0;
     try {
         if ( dispatcherProc != null ) {
             ret = dispatcherProc( ref aeffect, opcode, index, value, ptr, opt );
         }
     } catch ( Exception ex ) {
         Console.Error.WriteLine( "AEffectWrapper#Dispatch; ex=" + ex );
     }
     return ret;
 }
Exemplo n.º 12
0
 protected virtual VstIntPtr AudioMaster( ref AEffect effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, IntPtr ptr, float opt )
 {
     VstIntPtr result = 0;
     switch ( opcode ) {
         case AudioMasterOpcodes.audioMasterVersion: {
             result = Constants.kVstVersion;
             break;
         }
     }
     return result;
 }