You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
817B

  1. /* misc.c
  2. Free software by Richard W.E. Furse. Do with as you will. No
  3. warranty. */
  4. /*****************************************************************************/
  5. #include <dlfcn.h>
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9. /*****************************************************************************/
  10. #include "ladspa.h"
  11. #include "utils.h"
  12. /*****************************************************************************/
  13. unsigned long
  14. getPortCountByType(const LADSPA_Descriptor * psDescriptor,
  15. const LADSPA_PortDescriptor iType) {
  16. unsigned long lCount;
  17. unsigned long lIndex;
  18. lCount = 0;
  19. for (lIndex = 0; lIndex < psDescriptor->PortCount; lIndex++)
  20. if ((psDescriptor->PortDescriptors[lIndex] & iType) == iType)
  21. lCount++;
  22. return lCount;
  23. }