Example #1
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;
 }
Example #2
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;
 }