forked from urish/node-lsl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
69 lines (64 loc) · 1.87 KB
/
index.d.ts
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
type streamInfo = {};
type xmlPtr = {};
type outletType = {};
type streamInfoArray = {};
type buffer = {};
const channel_format_t: {
cft_float32: number;
cft_double64: number;
cft_string: number;
cft_int32: number;
cft_int16: number;
cft_int8: number;
cft_int64: number;
cft_undefined: number;
};
const error_code_t: {
no_error: number;
timeout_error: number;
lost_error: number;
argument_error: number;
internal_error: number;
};
class FloatArray {
constructor(values: number[]);
}
class DoubleArray {
constructor(values: number[]);
}
function protocol_version(): number;
function library_version(): number;
function local_clock(): double;
function create_streaminfo(
name: string,
type: string,
channel_count: number,
nominal_srate: number,
channel_format: number,
source_id: string,
): streamInfo;
function lsl_destroy_streaminfo(stream: streamInfo): void;
function lsl_copy_streaminfo(stream: streamInfo): streamInfo;
function get_desc(stream: streamInfo): xmlPtr;
function append_child_value(e: xmlPtr, name: string, value: string): void {}
function append_child(e: xmlPtr, name: string): xmlPtr {}
function create_outlet(info: xmlPtr, chunk_size: number, max_buffered: number): outletType {}
function push_sample_f(out: outletType, data: FloatArray): number;
function push_sample_ft(out: outletType, data: FloatArray, timestamp: number): number;
function destroy_outlet(out: outletType): void;
function resolve_byprop(
buffer: buffer,
buffer_elements: number,
prop: string,
value: string,
minimum: number,
timeout: number,
): streamInfo;
function create_inlet(stream: streamInfo, max_buflen: number, max_chunklen: number, recover: number);
function pull_chunk_f(
inlet: inletType,
data_buffer: FloatArray,
timestamp_buffer: DoubleArray,
timeout: number,
ec: number,
): number;