-
Notifications
You must be signed in to change notification settings - Fork 1
/
pdstub.c
70 lines (56 loc) · 774 Bytes
/
pdstub.c
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <stdlib.h>
#include <pure/runtime.h>
#include <m_pd.h>
extern char *pd_version_s(void)
{
static char buf[MAXPDSTRING];
sprintf(buf, "%d.%d", PD_MAJOR_VERSION, PD_MINOR_VERSION);
return buf;
}
pure_expr *pd_path(void)
{
return pure_listl(0);
}
pure_expr *pd_getdir(void)
{
return pure_cstring_dup(".");
}
pure_expr *pd_getfile(void)
{
return NULL;
}
void pd_setfile(char* s)
{
}
void pd_send(char* s, pure_expr* x)
{
char *t = str(x);
printf("%s: %s\n", s, t);
free(t);
}
void pd_receive(char* s)
{
}
void pd_unreceive(char* s)
{
}
void pd_post(char* s)
{
puts(s);
}
void pd_error_s(char* s)
{
puts(s);
}
double pd_time(void)
{
return 0.0;
}
float sys_getsr(void)
{
return 48000.0;
}
int sys_getblksize(void)
{
return 10;
}