summaryrefslogtreecommitdiff
path: root/modules/jack/jack.c
blob: 5bf9a1035d382eb40a3b3061dd1cd90af92d4725 (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
/**
 * @file jack.c  JACK audio driver
 *
 * Copyright (C) 2010 Creytiv.com
 */
#include <re.h>
#include <rem.h>
#include <baresip.h>
#include "mod_jack.h"


static struct auplay *auplay;
static struct ausrc *ausrc;


static int module_init(void)
{
	int err = 0;

	err |= auplay_register(&auplay, baresip_auplayl(),
			       "jack", jack_play_alloc);
	err |= ausrc_register(&ausrc, baresip_ausrcl(),
			      "jack", jack_src_alloc);

	return err;
}


static int module_close(void)
{
	auplay = mem_deref(auplay);
	ausrc  = mem_deref(ausrc);

	return 0;
}


const struct mod_export DECL_EXPORTS(jack) = {
	"jack",
	"sound",
	module_init,
	module_close
};