From 9e3ad2380a28a7473a1dfa9ae41697ebacfd85cc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 11 Jun 2004 00:33:43 +0000 Subject: autoconf git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@5 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/Makefile | 10 ---------- src/Makefile.am | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.c | 7 +++++++ src/sample.c | 4 ++-- 4 files changed, 64 insertions(+), 12 deletions(-) delete mode 100644 src/Makefile create mode 100644 src/Makefile.am (limited to 'src') diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 366e84e6..00000000 --- a/src/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -CFLAGS=-Wall -pipe -ansi -D_GNU_SOURCE - -all: idxset.o queue.o strbuf.o mainloop.o iochannel.o packet.o \ - memblock.o sample.o socket-server.o memblockq.o client.o \ - core.o main.o outputstream.o inputstream.o source.o sink.o \ - pstream.o protocol-simple.o protocol-simple-tcp.o sink-pipe.o \ - module.o - -clean: - rm -f *.o diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..c64babb3 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,55 @@ +# $Id: Makefile.am 27 2003-10-22 22:34:06Z lennart $ +# +# This file is part of polypaudio. +# +# polypaudio is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# polypaudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with polypaudio; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +AM_CFLAGS=-ansi -D_GNU_SOURCE + +bin_PROGRAMS = polypaudio + +pkglib_LTLIBRARIES=protocol-simple.la protocol-simple-tcp.la \ + socket-server.la sink-pipe.la pstream.la iochannel.la packet.la + +polypaudio_SOURCES = idxset.c queue.c strbuf.c mainloop.c \ + memblock.c sample.c memblockq.c client.c \ + core.c main.c outputstream.c inputstream.c source.c sink.c \ + module.c +polypaudio_INCLUDES = $(INCLTDL) +polypaudio_LDADD = $(LIBLTDL) +polypaudio_LDFLAGS=-export-dynamic + +protocol_simple_la_SOURCES = protocol-simple.c +protocol_simple_la_LDFLAGS = -module -avoid-version + +protocol_simple_tcp_la_SOURCES = protocol-simple-tcp.c +protocol_simple_tcp_la_LDFLAGS = -module -avoid-version +protocol_simple_tcp_la_LIBADD = protocol-simple.la socket-server.la + +socket_server_la_SOURCES = socket-server.c +socket_server_la_LDFLAGS = -module -avoid-version + +sink_pipe_la_SOURCES = sink-pipe.c +sink_pipe_la_LDFLAGS = -module -avoid-version + +pstream_la_SOURCES = pstream.c +pstream_la_LDFLAGS = -module -avoid-version + +iochannel_la_SOURCES = pstream.c +iochannel_la_LDFLAGS = -module -avoid-version + +packet_la_SOURCES = pstream.c +packet_la_LDFLAGS = -module -avoid-version + diff --git a/src/main.c b/src/main.c index 3104c264..0785b39c 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,6 @@ #include #include +#include #include "core.h" #include "mainloop.h" @@ -8,7 +9,11 @@ int main(int argc, char *argv[]) { struct mainloop *m; struct core *c; + int r; + r = lt_dlinit(); + assert(r == 0); + m = mainloop_new(); assert(m); c = core_new(m); @@ -21,6 +26,8 @@ int main(int argc, char *argv[]) { core_free(c); mainloop_free(m); + + lt_dlexit(); return 0; } diff --git a/src/sample.c b/src/sample.c index 74a54937..2e46eac7 100644 --- a/src/sample.c +++ b/src/sample.c @@ -10,7 +10,7 @@ struct sample_spec default_sample_spec = { }; struct memblock *silence(struct memblock* b, struct sample_spec *spec) { - char c; + char c = 0; assert(b && spec); memblock_assert_exclusive(b); @@ -53,7 +53,7 @@ void add_clip(struct memchunk *target, struct memchunk *chunk, struct sample_spe size_t sample_size(struct sample_spec *spec) { assert(spec); - size_t b; + size_t b = 1; switch (spec->format) { case SAMPLE_U8: -- cgit