where it does/does not work.
<a href="http://sox.sourceforge.net/">SoX</a>. SoX support will be
removed in a future version.</p>
- <p>The libao plugin is not built if you have libao 1.0.0 (because the
- plugin API is broken in that version).</p>
+ <p>The libao plugin has been removed, because the plugin API is not
+ usable in libao 1.0.0.</p>
<p>Playlists are now supported. These allow a collection of tracks to be
prepared offline and played as a unit.</p>
By default, built-in raw-format players are used for several encodings, so you
do not need to do anything.
-*** Use with libao
-
-To use raw format, use the execraw module and make the command choose the
-"disorder" libao driver. You may need to link the driver from wherever
-DisOrder installs it (e.g. /usr/local/lib/ao/plugins-2) to where libao will
-look for it (e.g. /usr/lib/ao/plugins-2 or /sw/lib/ao/plugins-2).
-
-For _non_ raw players it is advisable to use the new --wait-for-device option.
-This repeatedly tries to open the audio device before starting the player
-proper. It times out after a couple of seconds.
-
-See disorder_config(5) and the example configuration file for further
-information and examples.
-
** Low-Level Details
Raw format players are started slightly differently to normal ones. Before
if test $want_server = yes; then
subdirs="${subdirs} server plugins sounds"
- if test "$rjk_cv_libao_plugin_api_works" = yes; then
- subdirs="${subdirs} driver"
- fi
fi
if test $want_cgi = yes; then
subdirs="${subdirs} cgi templates images"
AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_new],
[AC_SUBST(LIBFLAC,[-lFLAC])],
[missing_libraries="$missing_libraries libFLAC"])
- if test $ac_cv_lib_ao_ao_initialize = yes; then
- # libao 1.0.0 breaks the plugin interface
- AC_CACHE_CHECK([whether libao has a working plugin interface],
- [rjk_cv_libao_plugin_api_works],[
- AC_COMPILE_IFELSE([#include <ao/ao.h>
-#include <ao/plugin.h>
-
-int ao_plugin_device_init(ao_device *d) {
- d->internal = 0;
-}],[rjk_cv_libao_plugin_api_works=yes],[rjk_cv_libao_plugin_api_works=no])])
- else
- rjk_cv_libao_plugin_api_works=no
- fi
fi
AC_CHECK_LIB([pthread], [pthread_create],
[AC_SUBST(LIBPTHREAD,[-lpthread])],
doc/Makefile
templates/Makefile
plugins/Makefile
- driver/Makefile
debian/Makefile
sounds/Makefile
python/Makefile
$(MAKE) DESTDIR=`pwd`/debian/disorder-server installdirs install -C images
$(MAKE) DESTDIR=`pwd`/debian/disorder-server installdirs install -C server
$(MAKE) DESTDIR=`pwd`/debian/disorder-server installdirs install -C templates
- $(MAKE) DESTDIR=`pwd`/debian/disorder-server installdirs install -C driver
$(MAKE) DESTDIR=`pwd`/debian/disorder-server installdirs install -C plugins
$(MAKE) DESTDIR=`pwd`/debian/disorder-server installdirs install -C sounds
$(MAKE) DESTDIR=`pwd`/debian/disorder-server installdirs install -C doc
echo mv $$f $${f/.0.0.0};\
mv $$f $${f/.0.0.0};\
done
- @for f in debian/disorder-server/usr/lib/ao/plugins*/*.so.0.0.0; do \
- echo mv $$f $${f/.0.0.0};\
- mv $$f $${f/.0.0.0};\
- done
find debian/disorder-server -name '*.so' -print0 | xargs -r0 strip --strip-unneeded
find debian/disorder-server -name '*.so' -print0 | xargs -r0 chmod -x
$(MKDIR) debian/disorder-server/etc/disorder
strip --remove-section=.comment \
debian/disorder-server/usr/sbin/* \
debian/disorder-server${cgiexecdir}/* \
- debian/disorder-server/usr/lib/ao/plugins*/*.so \
debian/disorder-server/usr/lib/disorder/*.so
cd debian/disorder-server && \
find -name DEBIAN -prune -o -type f -print \
device.
.TP
.B DISORDER_PLAYER_RAW
-A player that writes raw samples to \fB$DISORDER_RAW_FD\fR, for
-instance by using the \fBdisorder\fR libao driver.
+A player that writes raw samples to \fB$DISORDER_RAW_FD\fR.
.RE
.IP
Known capabilities are:
DisOrder raw player protocol.
.BR disorder-decode (8)
can decode several common audio file formats to this format.
-If your favourite format is not supported, but you have a player
-which uses libao, there is also a libao driver which supports this format;
-see below for more information about this.
.TP
.B shell \fR[\fISHELL\fR] \fICOMMAND\fR
The command is executed using the shell.
.IP
This must be the full URL, e.g. \fBhttp://myhost/cgi-bin/jukebox\fR and not
\fB/cgi-bin/jukebox\fR.
-.SH "LIBAO DRIVER"
-.SS "Raw Protocol Players"
-Raw protocol players are expected to use the \fBdisorder\fR libao driver.
-Programs that use libao generally have command line options to select the
-driver and pass options to it.
-.SS "Driver Options"
-The known driver options are:
-.TP
-.B fd
-The file descriptor to write to.
-If this is not specified then the driver looks like the environment
-variable \fBDISORDER_RAW_FD\fR.
-If that is not set then the default is 1 (i.e. standard output).
-.TP
-.B fragile
-If this is set to a nonzero value then the driver will call \fB_exit\fR(2) if a
-write to the output file descriptor fails.
-This is a workaround for buggy players such as \fBogg123\fR that ignore
-write errors.
.SH "REGEXP SUBSTITUTION RULES"
Regexps are PCRE regexps, as defined in \fBpcrepattern\fR(3).
The only option used is \fBPCRE_UTF8\fR.
+++ /dev/null
-#
-# This file is part of DisOrder
-# Copyright (C) 2005, 2007, 2008 Richard Kettlewell
-#
-# This program 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 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-
-aolib_LTLIBRARIES=libdisorder.la
-aolibdir=${libdir}/ao/plugins-2
-finkaolibdir=${finkdir}/lib/ao/plugins-2
-usraolibdir=/usr/lib/ao/plugins-2
-AM_CPPFLAGS=-I${top_srcdir}/lib
-
-libdisorder_la_SOURCES=disorder.c
-libdisorder_la_LDFLAGS=-module
-
-install-data-hook:
-
-# Link ao driver into right location. If you have some other location then
-# you'll need to modify this or link it manually.
-#
-# We don't mess with this for now; since disorder-decode covers some common
-# cases, the libao driver is less useful than it was.
-link-ao-driver:
- @if test -d ${DESTDIR}${finkaolibdir} \
- && test ${finkaolibdir} != ${aolibdir}; then \
- echo rm -f ${DESTDIR}${finkaolibdir}/libdisorder.*; \
- rm -f ${DESTDIR}${finkaolibdir}/libdisorder.*; \
- echo ln ${aolibdir}/libdisorder.* ${DESTDIR}${finkaolibdir}; \
- ln ${DESTDIR}${aolibdir}/libdisorder.* ${DESTDIR}${finkaolibdir}; \
- fi
- @if test -d ${DESTDIR}${usraolibdir} \
- && test ${usraolibdir} != ${aolibdir}; then \
- echo rm -f ${DESTDIR}${usraolibdir}/libdisorder.*; \
- rm -f ${DESTDIR}${usraolibdir}/libdisorder.*; \
- echo ln ${DESTDIR}${aolibdir}/libdisorder.* ${DESTDIR}${usraolibdir}; \
- ln ${DESTDIR}${aolibdir}/libdisorder.* ${DESTDIR}${usraolibdir}; \
- fi
+++ /dev/null
-/*
- * This file is part of DisOrder.
- * Copyright (C) 2005, 2007, 2010 Richard Kettlewell
- *
- * This program 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 3 of the License, or
- * (at your option) any later version.
- *
- * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
- */
-/** @file driver/disorder.c
- * @brief libao driver used by DisOrder
- *
- * The output from this driver is expected to be fed to @c
- * disorder-normalize to convert to the confnigured target format.
- *
- * @attention This driver will not build with libao 1.0.0. libao has
- * taken away half the plugin API and not provided any replacement.
- */
-
-#include "common.h"
-
-#include <errno.h>
-#include <unistd.h>
-#include <poll.h>
-#include <ao/ao.h>
-#include <ao/plugin.h>
-
-#include "speaker-protocol.h"
-
-/* extra declarations to help out lazy <ao/plugin.h> */
-int ao_plugin_test(void);
-ao_info *ao_plugin_driver_info(void);
-char *ao_plugin_file_extension(void);
-
-/** @brief Private data structure for this driver */
-struct internal {
- int fd; /* output file descriptor */
- int exit_on_error; /* exit on write error */
-
- /** @brief Record of sample format */
- struct stream_header header;
-
-};
-
-/* like write() but never returns EINTR/EAGAIN or short */
-static int do_write(int fd, const void *ptr, size_t n) {
- size_t written = 0;
- int ret;
- struct pollfd ufd;
-
- memset(&ufd, 0, sizeof ufd);
- ufd.fd = fd;
- ufd.events = POLLOUT;
- while(written < n) {
- ret = write(fd, (const char *)ptr + written, n - written);
- if(ret < 0) {
- switch(errno) {
- case EINTR: break;
- case EAGAIN:
- /* Someone sneakily gave us a nonblocking file descriptor, wait until
- * we can write again */
- ret = poll(&ufd, 1, -1);
- if(ret < 0 && errno != EINTR) return -1;
- break;
- default:
- return -1;
- }
- } else
- written += ret;
- }
- return written;
-}
-
-/* return 1 if this driver can be opened */
-int ao_plugin_test(void) {
- return 1;
-}
-
-/* return info about this driver */
-ao_info *ao_plugin_driver_info(void) {
- static const char *options[] = { "fd" };
- static const ao_info info = {
- AO_TYPE_LIVE, /* type */
- (char *)"DisOrder format driver", /* name */
- (char *)"disorder", /* short_name */
- (char *)"http://www.greenend.org.uk/rjk/disorder/", /* comment */
- (char *)"Richard Kettlewell", /* author */
- AO_FMT_NATIVE, /* preferred_byte_format */
- 0, /* priority */
- (char **)options, /* options */
- 1, /* option_count */
- };
- return (ao_info *)&info;
-}
-
-/* initialize the private data structure */
-int ao_plugin_device_init(ao_device *device) {
- struct internal *i = malloc(sizeof (struct internal));
- const char *e;
-
- if(!i) return 0;
- memset(i, 0, sizeof *i);
- if((e = getenv("DISORDER_RAW_FD")))
- i->fd = atoi(e);
- else
- i->fd = 1;
- device->internal = i;
- return 1;
-}
-
-/* set an option */
-int ao_plugin_set_option(ao_device *device,
- const char *key,
- const char *value) {
- struct internal *i = device->internal;
-
- if(!strcmp(key, "fd"))
- i->fd = atoi(value);
- else if(!strcmp(key, "fragile"))
- i->exit_on_error = atoi(value);
- /* unknown options are required to be ignored */
- return 1;
-}
-
-/* open the device */
-int ao_plugin_open(ao_device *device, ao_sample_format *format) {
- struct internal *i = device->internal;
-
- /* we would like native-order samples */
- device->driver_byte_format = AO_FMT_NATIVE;
- i->header.rate = format->rate;
- i->header.channels = format->channels;
- i->header.bits = format->bits;
- i->header.endian = ENDIAN_NATIVE;
- return 1;
-}
-
-/* play some samples */
-int ao_plugin_play(ao_device *device, const char *output_samples,
- uint_32 num_bytes) {
- struct internal *i = device->internal;
-
- /* Fill in and write the header */
- i->header.nbytes = num_bytes;
- if(do_write(i->fd, &i->header, sizeof i->header) < 0) {
- if(i->exit_on_error) _exit(-1);
- return 0;
- }
-
- /* Write the sample data */
- if(do_write(i->fd, output_samples, num_bytes) < 0) {
- if(i->exit_on_error) _exit(-1);
- return 0;
- }
- return 1;
-}
-
-/* close the device */
-int ao_plugin_close(ao_device attribute((unused)) *device) {
- return 1;
-}
-
-/* delete private data structures */
-void ao_plugin_device_clear(ao_device *device) {
- free(device->internal);
- device->internal = 0;
-}
-
-/* report preferred filename extension */
-char *ao_plugin_file_extension(void) {
- return 0;
-}
-
-/*
-Local Variables:
-c-basic-offset:2
-comment-column:40
-End:
-*/