12024
|
1 /*
|
|
2 The mediastreamer library aims at providing modular media processing and I/O
|
|
3 for linphone, but also for any telephony application.
|
|
4 Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org
|
|
5
|
|
6 This library is free software; you can redistribute it and/or
|
|
7 modify it under the terms of the GNU Lesser General Public
|
|
8 License as published by the Free Software Foundation; either
|
|
9 version 2.1 of the License, or (at your option) any later version.
|
|
10
|
|
11 This library is distributed in the hope that it will be useful,
|
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 Lesser General Public License for more details.
|
|
15
|
|
16 You should have received a copy of the GNU Lesser General Public
|
|
17 License along with this library; if not, write to the Free Software
|
|
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
19
|
|
20 JACK support
|
|
21 Copyright (C) 2004 Tobias Gehrig tobias@gehrig.tk
|
|
22 */
|
|
23
|
|
24 #ifndef JACK_CARD_H
|
|
25 #define JACK_CARD_H
|
|
26
|
|
27 #include <config.h>
|
|
28
|
|
29 #ifdef __JACK_ENABLED__
|
|
30
|
|
31 #include "sndcard.h"
|
|
32
|
|
33 #include <jack/jack.h>
|
|
34 #include <jack/ringbuffer.h>
|
|
35
|
|
36 #include <samplerate.h>
|
|
37
|
|
38 typedef jack_default_audio_sample_t sample_t;
|
|
39
|
|
40 typedef struct {
|
|
41 jack_port_t *port;
|
|
42 const char **phys_ports;
|
|
43 float level;
|
|
44 jack_ringbuffer_t *buffer;
|
|
45 gint channels;
|
|
46 gint rate;
|
|
47 SRC_STATE* src_state;
|
|
48 SRC_DATA data;
|
|
49 size_t frames;
|
|
50 gboolean can_process;
|
|
51 gboolean open;
|
|
52 gboolean init;
|
|
53 } jackcard_mode_t;
|
|
54
|
|
55 struct _JackCard
|
|
56 {
|
|
57 SndCard parent;
|
|
58
|
|
59 jack_client_t *client;
|
|
60 gboolean jack_running;
|
|
61 gboolean jack_active;
|
|
62 float level;
|
|
63 jack_nframes_t buffer_size;
|
|
64 gint sample_size;
|
|
65 gint frame_size;
|
|
66 gint rate;
|
|
67 gboolean can_process;
|
|
68 gboolean clear;
|
|
69
|
|
70 jackcard_mode_t read, write;
|
|
71 };
|
|
72
|
|
73 typedef struct _JackCard JackCard;
|
|
74
|
|
75 SndCard * jack_card_new(jack_client_t *client);
|
|
76
|
|
77 gint jack_card_manager_init(SndCardManager *m, gint index);
|
|
78
|
|
79 #endif
|
|
80
|
|
81 #endif
|