1 /*
2  * Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
3  *
4  * This is free software: you can redistribute it and/or modify
5  * it under the terms of the Artistic License 2.0 as published by
6  * The Perl Foundation.
7  *
8  * This source is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * Artistic License 2.0 for more details.
12  *
13  * You should have received a copy of the Artistic License 2.0
14  * along the source as a COPYING file. If not, obtain it from
15  * http://www.perlfoundation.org/artistic_license_2_0.
16  */
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include <stdint.h>
23 #include <stdbool.h>
24 
25 typedef void pcmi_t;
26 
27 pcmi_t *
28 pcmi_new(const char *play_name, const char *capt_name, uint32_t srate,
29 	uint32_t frsize, uint32_t nfrags, bool twochan, bool debug);
30 
31 void
32 pcmi_free(pcmi_t *pcmi);
33 
34 void
35 pcmi_printinfo(pcmi_t *pcmi);
36 
37 int
38 pcmi_ncapt(pcmi_t *pcmi);
39 
40 int
41 pcmi_nplay(pcmi_t *pcmi);
42 
43 void
44 pcmi_pcm_start(pcmi_t *pcmi);
45 
46 int
47 pcmi_pcm_wait(pcmi_t *pcmi);
48 
49 int
50 pcmi_pcm_idle(pcmi_t *pcmi, uint32_t frsize);
51 
52 void
53 pcmi_pcm_stop(pcmi_t *pcmi);
54 
55 void
56 pcmi_capt_init(pcmi_t *pcmi, uint32_t frsize);
57 
58 void
59 pcmi_capt_chan(pcmi_t *pcmi, uint32_t channel, float *dst, uint32_t frsize);
60 
61 void
62 pcmi_capt_done(pcmi_t *pcmi, uint32_t frsize);
63 
64 void
65 pcmi_play_init(pcmi_t *pcmi, uint32_t frsize);
66 
67 void
68 pcmi_clear_chan(pcmi_t *pcmi, uint32_t channel, uint32_t frsize);
69 
70 void
71 pcmi_play_chan(pcmi_t *pcmi, uint32_t channel, const float *src, uint32_t frsize);
72 
73 void
74 pcmi_play_done(pcmi_t *pcmi, uint32_t frsize);
75 
76 #ifdef __cplusplus
77 }
78 #endif
79