Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

53 lines
1.5KB

  1. #ifndef VCT_H
  2. #define VCT_H
  3. #if HAVE_SCHEME
  4. typedef struct s7_cell vct;
  5. #else
  6. typedef struct vct vct;
  7. #endif
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. MUS_EXPORT void mus_vct_init(void);
  12. MUS_EXPORT int mus_vct_print_length(void);
  13. MUS_EXPORT void mus_vct_set_print_length(int len);
  14. MUS_EXPORT Xen mus_array_to_list(mus_float_t *arr, mus_long_t i, mus_long_t len);
  15. MUS_EXPORT bool mus_vct_is_equal(vct *v1, vct *v2);
  16. MUS_EXPORT char *mus_vct_to_readable_string(vct *v);
  17. MUS_EXPORT vct *mus_vct_make(mus_long_t len);
  18. MUS_EXPORT vct *mus_vct_free(vct *v);
  19. MUS_EXPORT double mus_vct_peak(vct *v);
  20. MUS_EXPORT Xen xen_list_to_vct(Xen lst);
  21. MUS_EXPORT vct *xen_to_vct(Xen arg);
  22. MUS_EXPORT Xen xen_make_vct(mus_long_t len, mus_float_t *data);
  23. MUS_EXPORT Xen xen_make_vct_wrapper(mus_long_t len, mus_float_t *data);
  24. MUS_EXPORT Xen g_vct_peak(Xen obj);
  25. MUS_EXPORT vct *mus_vct_wrap(mus_long_t len, mus_float_t *data);
  26. #if HAVE_SCHEME
  27. #define S_vct "float-vector"
  28. #define Xen_to_vct(Obj) (vct *)Obj
  29. #define mus_vct_length(V) s7_vector_length((s7_pointer)V)
  30. #define mus_vct_data(V) s7_float_vector_elements((s7_pointer)V)
  31. #define mus_is_vct(Obj) s7_is_float_vector(Obj)
  32. #define vct_to_xen(V) (Xen)V
  33. #else
  34. #define S_vct "vct"
  35. #define Xen_to_vct(arg) ((vct *)Xen_object_ref(arg))
  36. MUS_EXPORT mus_long_t mus_vct_length(vct *v);
  37. MUS_EXPORT mus_float_t *mus_vct_data(vct *v);
  38. MUS_EXPORT bool mus_is_vct(Xen obj);
  39. MUS_EXPORT Xen vct_to_xen(vct *v);
  40. #endif
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif