mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@13 fefdeb5f-60dc-0310-8127-8f9354f1896f
24 lines
544 B
C
24 lines
544 B
C
#include <assert.h>
|
|
#include <arpa/inet.h>
|
|
|
|
#include "module.h"
|
|
#include "socket-server.h"
|
|
#include "protocol-simple.h"
|
|
|
|
int module_init(struct core *c, struct module*m) {
|
|
struct socket_server *s;
|
|
assert(c && m);
|
|
|
|
if (!(s = socket_server_new_ipv4(c->mainloop, INADDR_LOOPBACK, 4712)))
|
|
return -1;
|
|
|
|
m->userdata = protocol_simple_new(c, s, PROTOCOL_SIMPLE_PLAYBACK);
|
|
assert(m->userdata);
|
|
return 0;
|
|
}
|
|
|
|
void module_done(struct core *c, struct module*m) {
|
|
assert(c && m);
|
|
|
|
protocol_simple_free(m->userdata);
|
|
}
|