2 * Copyright (C) 2016 "IoT.bzh"
3 * Author "Manuel Bachmann"
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include <pulse/pulseaudio.h>
24 #include <pulse/simple.h>
25 #include <pulse/error.h>
27 #include "audio-alsa.h"
28 #include "local-def.h"
30 typedef struct dev_ctx_pulse dev_ctx_pulse_T;
31 typedef struct alsa_info alsa_info_T;
33 struct dev_ctx_pulse {
37 pa_context *pa_context;
41 unsigned char refresh;
43 unsigned char thr_should_run;
44 unsigned char thr_finished;
52 STATIC void _pulse_context_cb (pa_context *, void *);
53 STATIC void _pulse_sink_list_cb (pa_context *, const pa_sink_info *, int, void *);
54 STATIC void _pulse_sink_info_cb (pa_context *, const pa_sink_info *, int, void *);
55 STATIC void* _pulse_play_thread_fn (void *);
56 PUBLIC void _pulse_refresh_sink (dev_ctx_pulse_T *);
58 static struct alsa_info **alsa_info = NULL;
59 static struct dev_ctx_pulse **dev_ctx_p = NULL;
60 static unsigned int client_count = 0;
62 #endif /* AUDIO_PULSE_H */