Advertisement
Guest User

ladspa-vala.h

a guest
Sep 13th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.10 KB | None | 0 0
  1.  
  2. #ifndef LADSPA_VALA_H
  3. #define LADSPA_VALA_H
  4.  
  5. #include <ladspa.h>
  6.  
  7. // would be great if these could be added to ladspa.h upstream
  8. typedef LADSPA_Handle (*LADSPA_Instantiate_Function)(const struct _LADSPA_Descriptor * Descriptor, unsigned long SampleRate);
  9. typedef void (*LADSPA_Connect_Port_Function)(LADSPA_Handle Instance, unsigned long Port, LADSPA_Data * DataLocation);
  10. typedef void (*LADSPA_Activate_Function)(LADSPA_Handle Instance);
  11. typedef void (*LADSPA_Run_Function)(LADSPA_Handle Instance, unsigned long SampleCount);
  12. typedef void (*LADSPA_Run_Adding_Function)(LADSPA_Handle Instance, unsigned long SampleCount);
  13. typedef void (*LADSPA_Set_Run_Adding_Gain_Function)(LADSPA_Handle Instance, LADSPA_Data   Gain);
  14. typedef void (*LADSPA_Deactivate_Function)(LADSPA_Handle Instance);
  15. typedef void (*LADSPA_Cleanup_Function)(LADSPA_Handle Instance);
  16.  
  17. // this is a hack but will get the job done
  18. static void ladspa_handle_dummy_free(LADSPA_Handle Instance)
  19. {
  20.     if (Instance != NULL)
  21.     {
  22.         // TODO: could possibly report an error here about a memory leak
  23.     }
  24. }
  25.  
  26. #endif // LADSPA_VALA_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement