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