blob: 450b917668cf6da76d5bcb1f6cb7428e10e5ab83 (
plain)
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
|
/**
* @file pulse.c Pulseaudio sound driver
*
* Copyright (C) 2010 - 2016 Creytiv.com
*/
#include <re.h>
#include <rem.h>
#include <baresip.h>
#include "pulse.h"
/**
* @defgroup pulse pulse
*
* Audio driver module for Pulseaudio
*
* This module is experimental and work-in-progress. It is using
* the pulseaudio "simple" interface.
*/
static struct auplay *auplay;
static struct ausrc *ausrc;
static int module_init(void)
{
int err;
err = auplay_register(&auplay, "pulse", pulse_player_alloc);
err |= ausrc_register(&ausrc, "pulse", pulse_recorder_alloc);
return err;
}
static int module_close(void)
{
auplay = mem_deref(auplay);
ausrc = mem_deref(ausrc);
return 0;
}
EXPORT_SYM const struct mod_export DECL_EXPORTS(pulse) = {
"pulse",
"audio",
module_init,
module_close,
};
|