Commit c0a444d7 authored by Led's avatar Led

0.9.3-rc1

parent 4e533633
Developer -> Warren Dukes <shank@mercury.chem.pitt.edu>
Developer -> tw-nym
wave File Support -> normalperson
setuid patch -> Nagilum
'next' and 'previous' patch -> Niklas Hofer
ver 0.9.3 (2003/10/31)
1) Store total time/length of songs in db and display in *info commands
2) Display instantaneous bitrate in status command
3) Add Wave Support using libaudiofile (Patch from normalperson)
4) Command code cleanup (Patch from tw-nym)
5) Optimize listing of playlists (10-100x faster)
6) Optimize interface output (write in 4kB chunks instead of on every '\n')
7) Fix bug that prevented rm command from working
8) Fix bug where deleting current song skips the next song
ver 0.9.2 (2003/10/6) ver 0.9.2 (2003/10/6)
1) Fix FreeBSD Compilation Problems 1) Fix FreeBSD Compilation Problems
2) Fix bug in move command 2) Fix bug in move command
......
...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@ ...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@
AO_LIBS = @AO_LIBS@ AO_LIBS = @AO_LIBS@
AR = @AR@ AR = @AR@
AS = @AS@ AS = @AS@
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCAS = @CCAS@ CCAS = @CCAS@
...@@ -125,9 +128,10 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ ...@@ -125,9 +128,10 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \ uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \ install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = README COPYING ChangeLog INSTALL Makefile.am Makefile.in \ DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
TODO aclocal.m4 config.guess config.sub configure configure.in \ Makefile.in TODO aclocal.m4 compile config.guess config.sub \
depcomp install-sh ltmain.sh missing mkinstalldirs configure configure.in depcomp install-sh ltmain.sh missing \
mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive all: all-recursive
......
Music Player Daemon (MPD) - UPGRADING Music Player Daemon (MPD) - UPGRADING
Upgrading to 0.9.x Upgrading to 0.9.3
------------------
Wave support was added, so to have your wave files added, update the db (mpc
update).
Also, song lengths are now stored in the db. To get this stuff
added to the db, you will need to recreate the db from scratch. To do this,
run mpd with the "--create-db" commandline option.
Upgrading to 0.9.0
------------------ ------------------
The "stop_on_error" config parameter was removed, so be sure to remove this The "stop_on_error" config parameter was removed, so be sure to remove this
......
...@@ -7116,3 +7116,183 @@ int main () ...@@ -7116,3 +7116,183 @@ int main ()
rm -f conf.libFLACtest rm -f conf.libFLACtest
]) ])
# Configure paths for the Audio File Library
# Bertrand Guiheneuf 98-10-21
# stolen from esd.m4 in esound :
# Manish Singh 98-9-30
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBS.
dnl
AC_DEFUN(AM_PATH_AUDIOFILE,
[dnl
dnl Get compiler flags and libraries from the audiofile-config script.
dnl
AC_ARG_WITH(audiofile-prefix,[ --with-audiofile-prefix=PFX Prefix where Audio File Library is installed (optional)],
audiofile_prefix="$withval", audiofile_prefix="")
AC_ARG_WITH(audiofile-exec-prefix,[ --with-audiofile-exec-prefix=PFX Exec prefix where Audio File Library is installed (optional)],
audiofile_exec_prefix="$withval", audiofile_exec_prefix="")
AC_ARG_ENABLE(audiofiletest, [ --disable-audiofiletest Do not try to compile and run a test Audio File Library program], , enable_audiofiletest=yes)
if test x$audiofile_exec_prefix != x ; then
audiofile_args="$audiofile_args --exec-prefix=$audiofile_exec_prefix"
if test x${AUDIOFILE_CONFIG+set} != xset ; then
AUDIOFILE_CONFIG=$audiofile_exec_prefix/bin/audiofile-config
fi
fi
if test x$audiofile_prefix != x ; then
audiofile_args="$audiofile_args --prefix=$audiofile_prefix"
if test x${AUDIOFILE_CONFIG+set} != xset ; then
AUDIOFILE_CONFIG=$audiofile_prefix/bin/audiofile-config
fi
fi
AC_PATH_PROG(AUDIOFILE_CONFIG, audiofile-config, no)
min_audiofile_version=ifelse([$1], ,0.2.5,$1)
AC_MSG_CHECKING(for Audio File Library - version >= $min_audiofile_version)
no_audiofile=""
if test "$AUDIOFILE_CONFIG" = "no" ; then
no_audiofile=yes
else
AUDIOFILE_LIBS=`$AUDIOFILE_CONFIG $audiofileconf_args --libs`
AUDIOFILE_CFLAGS=`$AUDIOFILE_CONFIG $audiofileconf_args --cflags`
audiofile_major_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
audiofile_minor_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
audiofile_micro_version=`$AUDIOFILE_CONFIG $audiofile_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_audiofiletest" = "xyes" ; then
AC_LANG_SAVE
AC_LANG_C
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
LIBS="$LIBS $AUDIOFILE_LIBS"
dnl
dnl Now check if the installed Audio File Library is sufficiently new.
dnl (Also checks the sanity of the results of audiofile-config to some extent.)
dnl
rm -f conf.audiofiletest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <audiofile.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.audiofiletest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_audiofile_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_audiofile_version");
exit(1);
}
if (($audiofile_major_version > major) ||
(($audiofile_major_version == major) && ($audiofile_minor_version > minor)) ||
(($audiofile_major_version == major) && ($audiofile_minor_version == minor) && ($audiofile_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'audiofile-config --version' returned %d.%d.%d, but the minimum version\n", $audiofile_major_version, $audiofile_minor_version, $audiofile_micro_version);
printf("*** of the Audio File Library required is %d.%d.%d. If audiofile-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If audiofile-config was wrong, set the environment variable AUDIOFILE_CONFIG\n");
printf("*** to point to the correct copy of audiofile-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_audiofile=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_RESTORE
fi
fi
if test "x$no_audiofile" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$AUDIOFILE_CONFIG" = "no" ; then
cat <<END
*** The audiofile-config script installed by the Audio File Library could
*** not be found. If the Audio File Library was installed in PREFIX, make
*** sure PREFIX/bin is in your path, or set the AUDIOFILE_CONFIG
*** environment variable to the full path to audiofile-config.
END
else
if test -f conf.audiofiletest ; then
:
else
echo "*** Could not run Audio File Library test program; checking why..."
AC_LANG_SAVE
AC_LANG_C
CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
LIBS="$LIBS $AUDIOFILE_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <audiofile.h>
], [ return 0; ],
[ cat <<END
*** The test program compiled, but did not run. This usually means that
*** the run-time linker is not finding Audio File Library or finding the
*** wrong version of Audio File Library.
***
*** If it is not finding Audio File Library, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location. Also, make sure you have run ldconfig if
*** that is required on your system.
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying
*** LD_LIBRARY_PATH.
END
],
[ echo "*** The test program failed to compile or link. See the file config.log"
echo "*** for the exact error that occured. This usually means the Audio File"
echo "*** Library was incorrectly installed or that you have moved the Audio"
echo "*** File Library since it was installed. In the latter case, you may want"
echo "*** to edit the audiofile-config script: $AUDIOFILE_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_RESTORE
fi
fi
AUDIOFILE_CFLAGS=""
AUDIOFILE_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(AUDIOFILE_CFLAGS)
AC_SUBST(AUDIOFILE_LIBS)
rm -f conf.audiofiletest
])
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Copyright 1999, 2000 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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 2, 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Usage:
# compile PROGRAM [ARGS]...
# `-o FOO.o' is removed from the args passed to the actual compile.
prog=$1
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we do something ugly here.
ofile=$2
shift
case "$ofile" in
*.o | *.obj)
;;
*)
args="$args -o $ofile"
ofile=
;;
esac
;;
*.c)
cfile=$1
args="$args $1"
;;
*)
args="$args $1"
;;
esac
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$prog" $args
fi
# Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2003-07-02' timestamp='2003-10-07'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
...@@ -734,7 +734,7 @@ EOF ...@@ -734,7 +734,7 @@ EOF
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
*:UNICOS/mp:*:*) *:UNICOS/mp:*:*)
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
...@@ -751,7 +751,7 @@ EOF ...@@ -751,7 +751,7 @@ EOF
*:BSD/OS:*:*) *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:FreeBSD:*:*|*:GNU/FreeBSD:*:*) *:FreeBSD:*:*)
# Determine whether the default compiler uses glibc. # Determine whether the default compiler uses glibc.
eval $set_cc_for_build eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
...@@ -763,7 +763,7 @@ EOF ...@@ -763,7 +763,7 @@ EOF
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
# GNU/FreeBSD systems have a "k" prefix to indicate we are using # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
# FreeBSD's kernel, but not the complete OS. # FreeBSD's kernel, but not the complete OS.
case ${LIBC} in gnu) kernel_only='k' ;; esac case ${LIBC} in gnu) kernel_only='k' ;; esac
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
...@@ -799,8 +799,13 @@ EOF ...@@ -799,8 +799,13 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;; exit 0 ;;
*:GNU:*:*) *:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;; exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*) i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit 0 ;; exit 0 ;;
...@@ -948,6 +953,9 @@ EOF ...@@ -948,6 +953,9 @@ EOF
LIBC=gnuaout LIBC=gnuaout
#endif #endif
#endif #endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
...@@ -1049,7 +1057,7 @@ EOF ...@@ -1049,7 +1057,7 @@ EOF
exit 0 ;; exit 0 ;;
M68*:*:R3V[567]*:*) M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL='' OS_REL=''
test -r /etc/.relid \ test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
...@@ -1164,7 +1172,7 @@ EOF ...@@ -1164,7 +1172,7 @@ EOF
*:QNX:*:4*) *:QNX:*:4*)
echo i386-pc-qnx echo i386-pc-qnx
exit 0 ;; exit 0 ;;
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE} echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:NonStop-UX:*:*) *:NonStop-UX:*:*)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2003-07-17' timestamp='2003-10-07'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
...@@ -118,7 +118,7 @@ esac ...@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
...@@ -248,6 +248,7 @@ case $basic_machine in ...@@ -248,6 +248,7 @@ case $basic_machine in
| mipsisa32 | mipsisa32el \ | mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \ | mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \ | mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
...@@ -320,6 +321,7 @@ case $basic_machine in ...@@ -320,6 +321,7 @@ case $basic_machine in
| mipsisa32-* | mipsisa32el-* \ | mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \ | mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \ | mipstx39-* | mipstx39el-* \
...@@ -1129,7 +1131,7 @@ case $os in ...@@ -1129,7 +1131,7 @@ case $os in
| -aos* \ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
...@@ -1165,6 +1167,9 @@ case $os in ...@@ -1165,6 +1167,9 @@ case $os in
-mac*) -mac*)
os=`echo $os | sed -e 's|mac|macos|'` os=`echo $os | sed -e 's|mac|macos|'`
;; ;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*) -linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'` os=`echo $os | sed -e 's|linux|linux-gnu|'`
;; ;;
......
...@@ -464,7 +464,7 @@ ac_includes_default="\ ...@@ -464,7 +464,7 @@ ac_includes_default="\
ac_subdirs_all="$ac_subdirs_all src/libid3tag" ac_subdirs_all="$ac_subdirs_all src/libid3tag"
ac_subdirs_all="$ac_subdirs_all src/libmad" ac_subdirs_all="$ac_subdirs_all src/libmad"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL CCAS CCASFLAGS MAD_SUBDIR MAD_LIB ID3_SUBDIR ID3_LIB MPD_LIBS MPD_CFLAGS AO_CFLAGS AO_LIBS subdirs OGG_CFLAGS OGG_LIBS VORBIS_CFLAGS VORBIS_LIBS VORBISFILE_LIBS VORBISENC_LIBS LIBFLAC_CFLAGS LIBFLAC_LIBS LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL CCAS CCASFLAGS MAD_SUBDIR MAD_LIB ID3_SUBDIR ID3_LIB MPD_LIBS MPD_CFLAGS AO_CFLAGS AO_LIBS subdirs OGG_CFLAGS OGG_LIBS VORBIS_CFLAGS VORBIS_LIBS VORBISFILE_LIBS VORBISENC_LIBS LIBFLAC_CFLAGS LIBFLAC_LIBS AUDIOFILE_CONFIG AUDIOFILE_CFLAGS AUDIOFILE_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
...@@ -1033,9 +1033,11 @@ Optional Features: ...@@ -1033,9 +1033,11 @@ Optional Features:
--enable-fast-install[=PKGS] --enable-fast-install[=PKGS]
optimize for fast installation [default=yes] optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds) --disable-libtool-lock avoid locking (might break parallel builds)
--disable-iconv disable iconv support
--disable-ogg disable ogg support --disable-ogg disable ogg support
--disable-flac disable flac support --disable-flac disable flac support
--disable-mp3 disable mp3 support --disable-mp3 disable mp3 support
--disable-audiofile disable audiofile support
--enable-mpd-mad use mpd libmad --enable-mpd-mad use mpd libmad
--disable-id3 disable id3 support --disable-id3 disable id3 support
--enable-mpd-id3tag use mpd libid3tag --enable-mpd-id3tag use mpd libid3tag
...@@ -1043,6 +1045,7 @@ Optional Features: ...@@ -1043,6 +1045,7 @@ Optional Features:
--disable-oggtest Do not try to compile and run a test Ogg program --disable-oggtest Do not try to compile and run a test Ogg program
--disable-vorbistest Do not try to compile and run a test Vorbis program --disable-vorbistest Do not try to compile and run a test Vorbis program
--disable-libFLACtest Do not try to compile and run a test libFLAC program --disable-libFLACtest Do not try to compile and run a test libFLAC program
--disable-audiofiletest Do not try to compile and run a test Audio File Library program
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
...@@ -1070,6 +1073,8 @@ Optional Packages: ...@@ -1070,6 +1073,8 @@ Optional Packages:
--with-libFLAC=PFX Prefix where libFLAC is installed (optional) --with-libFLAC=PFX Prefix where libFLAC is installed (optional)
--with-libFLAC-libraries=DIR Directory where libFLAC library is installed (optional) --with-libFLAC-libraries=DIR Directory where libFLAC library is installed (optional)
--with-libFLAC-includes=DIR Directory where libFLAC header files are installed (optional) --with-libFLAC-includes=DIR Directory where libFLAC header files are installed (optional)
--with-audiofile-prefix=PFX Prefix where Audio File Library is installed (optional)
--with-audiofile-exec-prefix=PFX Exec prefix where Audio File Library is installed (optional)
Some influential environment variables: Some influential environment variables:
CC C compiler command CC C compiler command
...@@ -1745,7 +1750,7 @@ fi ...@@ -1745,7 +1750,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=mpd PACKAGE=mpd
VERSION=0.9.2 VERSION=0.9.3
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -3585,7 +3590,7 @@ ia64-*-hpux*) ...@@ -3585,7 +3590,7 @@ ia64-*-hpux*)
;; ;;
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo '#line 3588 "configure"' > conftest.$ac_ext echo '#line 3593 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
...@@ -5048,7 +5053,7 @@ fi ...@@ -5048,7 +5053,7 @@ fi
# Provide some information about the compiler. # Provide some information about the compiler.
echo "$as_me:5051:" \ echo "$as_me:5056:" \
"checking for Fortran 77 compiler version" >&5 "checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2` ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
...@@ -6060,11 +6065,11 @@ else ...@@ -6060,11 +6065,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6063: $lt_compile\"" >&5) (eval echo "\"\$as_me:6068: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:6067: \$? = $ac_status" >&5 echo "$as_me:6072: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -6293,11 +6298,11 @@ else ...@@ -6293,11 +6298,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6296: $lt_compile\"" >&5) (eval echo "\"\$as_me:6301: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:6300: \$? = $ac_status" >&5 echo "$as_me:6305: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -6360,11 +6365,11 @@ else ...@@ -6360,11 +6365,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6363: $lt_compile\"" >&5) (eval echo "\"\$as_me:6368: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:6367: \$? = $ac_status" >&5 echo "$as_me:6372: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -8420,7 +8425,7 @@ else ...@@ -8420,7 +8425,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8423 "configure" #line 8428 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -8518,7 +8523,7 @@ else ...@@ -8518,7 +8523,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8521 "configure" #line 8526 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -10677,11 +10682,11 @@ else ...@@ -10677,11 +10682,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:10680: $lt_compile\"" >&5) (eval echo "\"\$as_me:10685: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:10684: \$? = $ac_status" >&5 echo "$as_me:10689: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -10744,11 +10749,11 @@ else ...@@ -10744,11 +10749,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:10747: $lt_compile\"" >&5) (eval echo "\"\$as_me:10752: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:10751: \$? = $ac_status" >&5 echo "$as_me:10756: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -12001,7 +12006,7 @@ else ...@@ -12001,7 +12006,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 12004 "configure" #line 12009 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -12099,7 +12104,7 @@ else ...@@ -12099,7 +12104,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 12102 "configure" #line 12107 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -12926,11 +12931,11 @@ else ...@@ -12926,11 +12931,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12929: $lt_compile\"" >&5) (eval echo "\"\$as_me:12934: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:12933: \$? = $ac_status" >&5 echo "$as_me:12938: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -12993,11 +12998,11 @@ else ...@@ -12993,11 +12998,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12996: $lt_compile\"" >&5) (eval echo "\"\$as_me:13001: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:13000: \$? = $ac_status" >&5 echo "$as_me:13005: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -14987,11 +14992,11 @@ else ...@@ -14987,11 +14992,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14990: $lt_compile\"" >&5) (eval echo "\"\$as_me:14995: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:14994: \$? = $ac_status" >&5 echo "$as_me:14999: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -15220,11 +15225,11 @@ else ...@@ -15220,11 +15225,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15223: $lt_compile\"" >&5) (eval echo "\"\$as_me:15228: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:15227: \$? = $ac_status" >&5 echo "$as_me:15232: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -15287,11 +15292,11 @@ else ...@@ -15287,11 +15292,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15290: $lt_compile\"" >&5) (eval echo "\"\$as_me:15295: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:15294: \$? = $ac_status" >&5 echo "$as_me:15299: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -17347,7 +17352,7 @@ else ...@@ -17347,7 +17352,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 17350 "configure" #line 17355 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -17445,7 +17450,7 @@ else ...@@ -17445,7 +17450,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 17448 "configure" #line 17453 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -18478,6 +18483,13 @@ if test "${enable_ogg+set}" = set; then ...@@ -18478,6 +18483,13 @@ if test "${enable_ogg+set}" = set; then
enableval="$enable_ogg" enableval="$enable_ogg"
else else
enable_iconv=yes
fi;
# Check whether --enable-ogg or --disable-ogg was given.
if test "${enable_ogg+set}" = set; then
enableval="$enable_ogg"
else
enable_ogg=yes enable_ogg=yes
fi; fi;
# Check whether --enable-flac or --disable-flac was given. # Check whether --enable-flac or --disable-flac was given.
...@@ -18494,6 +18506,13 @@ if test "${enable_mp3+set}" = set; then ...@@ -18494,6 +18506,13 @@ if test "${enable_mp3+set}" = set; then
else else
enable_mp3=yes enable_mp3=yes
fi; fi;
# Check whether --enable-audiofile or --disable-audiofile was given.
if test "${enable_audiofile+set}" = set; then
enableval="$enable_audiofile"
else
enable_audiofile=yes
fi;
# Check whether --enable-mpd_mad or --disable-mpd_mad was given. # Check whether --enable-mpd_mad or --disable-mpd_mad was given.
if test "${enable_mpd_mad+set}" = set; then if test "${enable_mpd_mad+set}" = set; then
enableval="$enable_mpd_mad" enableval="$enable_mpd_mad"
...@@ -18679,6 +18698,143 @@ if test $ac_cv_lib_nsl_gethostbyname = yes; then ...@@ -18679,6 +18698,143 @@ if test $ac_cv_lib_nsl_gethostbyname = yes; then
fi fi
if test x$enable_iconv = xyes; then
if test "${ac_cv_header_iconv_h+set}" = set; then
echo "$as_me:$LINENO: checking for iconv.h" >&5
echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
if test "${ac_cv_header_iconv_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking iconv.h usability" >&5
echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <iconv.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking iconv.h presence" >&5
echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <iconv.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc in
yes:no )
{ echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
## Report this to bug-autoconf@gnu.org. ##
## ------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
## Report this to bug-autoconf@gnu.org. ##
## ------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for iconv.h" >&5
echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
if test "${ac_cv_header_iconv_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_header_iconv_h=$ac_header_preproc
fi
echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
fi
if test $ac_cv_header_iconv_h = yes; then
MPD_CFLAGS="$MPD_CFLAGS -DHAVE_ICONV"
fi
fi
echo "$as_me:$LINENO: checking for ipv6" >&5 echo "$as_me:$LINENO: checking for ipv6" >&5
echo $ECHO_N "checking for ipv6... $ECHO_C" >&6 echo $ECHO_N "checking for ipv6... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -20176,6 +20332,318 @@ if test x$enable_flac = xyes; then ...@@ -20176,6 +20332,318 @@ if test x$enable_flac = xyes; then
MPD_CFLAGS="$MPD_CFLAGS -DHAVE_FLAC" MPD_CFLAGS="$MPD_CFLAGS -DHAVE_FLAC"
fi fi
if test x$enable_audiofile = xyes; then
# Check whether --with-audiofile-prefix or --without-audiofile-prefix was given.
if test "${with_audiofile_prefix+set}" = set; then
withval="$with_audiofile_prefix"
audiofile_prefix="$withval"
else
audiofile_prefix=""
fi;
# Check whether --with-audiofile-exec-prefix or --without-audiofile-exec-prefix was given.
if test "${with_audiofile_exec_prefix+set}" = set; then
withval="$with_audiofile_exec_prefix"
audiofile_exec_prefix="$withval"
else
audiofile_exec_prefix=""
fi;
# Check whether --enable-audiofiletest or --disable-audiofiletest was given.
if test "${enable_audiofiletest+set}" = set; then
enableval="$enable_audiofiletest"
else
enable_audiofiletest=yes
fi;
if test x$audiofile_exec_prefix != x ; then
audiofile_args="$audiofile_args --exec-prefix=$audiofile_exec_prefix"
if test x${AUDIOFILE_CONFIG+set} != xset ; then
AUDIOFILE_CONFIG=$audiofile_exec_prefix/bin/audiofile-config
fi
fi
if test x$audiofile_prefix != x ; then
audiofile_args="$audiofile_args --prefix=$audiofile_prefix"
if test x${AUDIOFILE_CONFIG+set} != xset ; then
AUDIOFILE_CONFIG=$audiofile_prefix/bin/audiofile-config
fi
fi
# Extract the first word of "audiofile-config", so it can be a program name with args.
set dummy audiofile-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_AUDIOFILE_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $AUDIOFILE_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_AUDIOFILE_CONFIG="$AUDIOFILE_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_AUDIOFILE_CONFIG="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_path_AUDIOFILE_CONFIG" && ac_cv_path_AUDIOFILE_CONFIG="no"
;;
esac
fi
AUDIOFILE_CONFIG=$ac_cv_path_AUDIOFILE_CONFIG
if test -n "$AUDIOFILE_CONFIG"; then
echo "$as_me:$LINENO: result: $AUDIOFILE_CONFIG" >&5
echo "${ECHO_T}$AUDIOFILE_CONFIG" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
min_audiofile_version=0.1.7
echo "$as_me:$LINENO: checking for Audio File Library - version >= $min_audiofile_version" >&5
echo $ECHO_N "checking for Audio File Library - version >= $min_audiofile_version... $ECHO_C" >&6
no_audiofile=""
if test "$AUDIOFILE_CONFIG" = "no" ; then
no_audiofile=yes
else
AUDIOFILE_LIBS=`$AUDIOFILE_CONFIG $audiofileconf_args --libs`
AUDIOFILE_CFLAGS=`$AUDIOFILE_CONFIG $audiofileconf_args --cflags`
audiofile_major_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
audiofile_minor_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
audiofile_micro_version=`$AUDIOFILE_CONFIG $audiofile_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
if test "x$enable_audiofiletest" = "xyes" ; then
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
LIBS="$LIBS $AUDIOFILE_LIBS"
rm -f conf.audiofiletest
if test "$cross_compiling" = yes; then
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <audiofile.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.audiofiletest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_audiofile_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_audiofile_version");
exit(1);
}
if (($audiofile_major_version > major) ||
(($audiofile_major_version == major) && ($audiofile_minor_version > minor)) ||
(($audiofile_major_version == major) && ($audiofile_minor_version == minor) && ($audiofile_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'audiofile-config --version' returned %d.%d.%d, but the minimum version\n", $audiofile_major_version, $audiofile_minor_version, $audiofile_micro_version);
printf("*** of the Audio File Library required is %d.%d.%d. If audiofile-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If audiofile-config was wrong, set the environment variable AUDIOFILE_CONFIG\n");
printf("*** to point to the correct copy of audiofile-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
no_audiofile=yes
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
fi
if test "x$no_audiofile" = x ; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
MPD_LIBS="$MPD_LIBS -laudiofile" MPD_CFLAGS="$MPD_CFLAGS -DHAVE_AUDIOFILE"
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
if test "$AUDIOFILE_CONFIG" = "no" ; then
cat <<END
*** The audiofile-config script installed by the Audio File Library could
*** not be found. If the Audio File Library was installed in PREFIX, make
*** sure PREFIX/bin is in your path, or set the AUDIOFILE_CONFIG
*** environment variable to the full path to audiofile-config.
END
else
if test -f conf.audiofiletest ; then
:
else
echo "*** Could not run Audio File Library test program; checking why..."
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
LIBS="$LIBS $AUDIOFILE_LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
#include <audiofile.h>
int
main ()
{
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat <<END
*** The test program compiled, but did not run. This usually means that
*** the run-time linker is not finding Audio File Library or finding the
*** wrong version of Audio File Library.
***
*** If it is not finding Audio File Library, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location. Also, make sure you have run ldconfig if
*** that is required on your system.
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying
*** LD_LIBRARY_PATH.
END
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
echo "*** The test program failed to compile or link. See the file config.log"
echo "*** for the exact error that occured. This usually means the Audio File"
echo "*** Library was incorrectly installed or that you have moved the Audio"
echo "*** File Library since it was installed. In the latter case, you may want"
echo "*** to edit the audiofile-config script: $AUDIOFILE_CONFIG"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
fi
AUDIOFILE_CFLAGS=""
AUDIOFILE_LIBS=""
enable_audiofile=no;{ echo "$as_me:$LINENO: WARNING: You need audiofile -- disabling audiofile support" >&5
echo "$as_me: WARNING: You need audiofile -- disabling audiofile support" >&2;}
fi
rm -f conf.audiofiletest
fi
ac_config_files="$ac_config_files debian/Makefile doc/Makefile src/Makefile Makefile" ac_config_files="$ac_config_files debian/Makefile doc/Makefile src/Makefile Makefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
...@@ -20908,6 +21376,9 @@ s,@VORBISFILE_LIBS@,$VORBISFILE_LIBS,;t t ...@@ -20908,6 +21376,9 @@ s,@VORBISFILE_LIBS@,$VORBISFILE_LIBS,;t t
s,@VORBISENC_LIBS@,$VORBISENC_LIBS,;t t s,@VORBISENC_LIBS@,$VORBISENC_LIBS,;t t
s,@LIBFLAC_CFLAGS@,$LIBFLAC_CFLAGS,;t t s,@LIBFLAC_CFLAGS@,$LIBFLAC_CFLAGS,;t t
s,@LIBFLAC_LIBS@,$LIBFLAC_LIBS,;t t s,@LIBFLAC_LIBS@,$LIBFLAC_LIBS,;t t
s,@AUDIOFILE_CONFIG@,$AUDIOFILE_CONFIG,;t t
s,@AUDIOFILE_CFLAGS@,$AUDIOFILE_CFLAGS,;t t
s,@AUDIOFILE_LIBS@,$AUDIOFILE_LIBS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF CEOF
......
AC_INIT(src/main.c) AC_INIT(src/main.c)
AM_INIT_AUTOMAKE(mpd, 0.9.2) AM_INIT_AUTOMAKE(mpd, 0.9.3)
AC_PROG_CC AC_PROG_CC
AC_PROG_INSTALL AC_PROG_INSTALL
...@@ -19,9 +19,11 @@ AC_SUBST(MPD_CFLAGS) ...@@ -19,9 +19,11 @@ AC_SUBST(MPD_CFLAGS)
MPD_CFLAGS="-Wall" MPD_CFLAGS="-Wall"
MPD_LIBS="" MPD_LIBS=""
AC_ARG_ENABLE(ogg,[ --disable-iconv disable iconv support],,enable_iconv=yes)
AC_ARG_ENABLE(ogg,[ --disable-ogg disable ogg support],,enable_ogg=yes) AC_ARG_ENABLE(ogg,[ --disable-ogg disable ogg support],,enable_ogg=yes)
AC_ARG_ENABLE(flac,[ --disable-flac disable flac support],,enable_flac=yes) AC_ARG_ENABLE(flac,[ --disable-flac disable flac support],,enable_flac=yes)
AC_ARG_ENABLE(mp3,[ --disable-mp3 disable mp3 support],,enable_mp3=yes) AC_ARG_ENABLE(mp3,[ --disable-mp3 disable mp3 support],,enable_mp3=yes)
AC_ARG_ENABLE(audiofile,[ --disable-audiofile disable audiofile support],,enable_audiofile=yes)
AC_ARG_ENABLE(mpd_mad,[ --enable-mpd-mad use mpd libmad],use_mpd_mad=yes,) AC_ARG_ENABLE(mpd_mad,[ --enable-mpd-mad use mpd libmad],use_mpd_mad=yes,)
AC_ARG_ENABLE(id3,[ --disable-id3 disable id3 support],,enable_id3=yes) AC_ARG_ENABLE(id3,[ --disable-id3 disable id3 support],,enable_id3=yes)
AC_ARG_ENABLE(mpd_id3tag,[ --enable-mpd-id3tag use mpd libid3tag],use_mpd_id3tag=yes,) AC_ARG_ENABLE(mpd_id3tag,[ --enable-mpd-id3tag use mpd libid3tag],use_mpd_id3tag=yes,)
...@@ -37,6 +39,10 @@ AC_ARG_WITH(mad-includes,[ --with-mad-includes=DIR Directory where mad header ...@@ -37,6 +39,10 @@ AC_ARG_WITH(mad-includes,[ --with-mad-includes=DIR Directory where mad header
AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",) AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",)
AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",) AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
if test x$enable_iconv = xyes; then
AC_CHECK_HEADER(iconv.h,MPD_CFLAGS="$MPD_CFLAGS -DHAVE_ICONV",)
fi
AC_MSG_CHECKING(for ipv6) AC_MSG_CHECKING(for ipv6)
AC_EGREP_CPP([AP_maGiC_VALUE], AC_EGREP_CPP([AP_maGiC_VALUE],
[ [
...@@ -242,4 +248,9 @@ if test x$enable_flac = xyes; then ...@@ -242,4 +248,9 @@ if test x$enable_flac = xyes; then
MPD_CFLAGS="$MPD_CFLAGS -DHAVE_FLAC" MPD_CFLAGS="$MPD_CFLAGS -DHAVE_FLAC"
fi fi
if test x$enable_audiofile = xyes; then
AM_PATH_AUDIOFILE(0.1.7, MPD_LIBS="$MPD_LIBS -laudiofile" MPD_CFLAGS="$MPD_CFLAGS -DHAVE_AUDIOFILE",
[enable_audiofile=no;AC_MSG_WARN(You need audiofile -- disabling audiofile support)])
fi
AC_OUTPUT(debian/Makefile doc/Makefile src/Makefile Makefile ) AC_OUTPUT(debian/Makefile doc/Makefile src/Makefile Makefile )
EXTRA_DIST = changelog compat control copyright dirs docs rules EXTRA_DIST = changelog compat control copyright dirs docs rules config \
init postinst postrm prerm templates conffiles
...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@ ...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@
AO_LIBS = @AO_LIBS@ AO_LIBS = @AO_LIBS@
AR = @AR@ AR = @AR@
AS = @AS@ AS = @AS@
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCAS = @CCAS@ CCAS = @CCAS@
...@@ -109,7 +112,9 @@ VORBIS_LIBS = @VORBIS_LIBS@ ...@@ -109,7 +112,9 @@ VORBIS_LIBS = @VORBIS_LIBS@
am__include = @am__include@ am__include = @am__include@
am__quote = @am__quote@ am__quote = @am__quote@
install_sh = @install_sh@ install_sh = @install_sh@
EXTRA_DIST = changelog compat control copyright dirs docs rules EXTRA_DIST = changelog compat control copyright dirs docs rules config \
init postinst postrm prerm templates conffiles
subdir = debian subdir = debian
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
......
mpd (0.9.3-1) unstable; urgency=low
* Update to 0.9.3
* Switch to cdbs
* Use debconf for configure music_directory, playlist_directory, port
* Add /etc/mpd.conf and /etc/mpd/conf
* Add initd script
-- Warren Dukes (aka shank) <shank@mercury.chem.pitt.edu> Tue, 31 Oct 2003 18:16:00 -0400
mpd (0.9.2-1) unstable; urgency=low mpd (0.9.2-1) unstable; urgency=low
* Update to 0.9.2 * Update to 0.9.2
-- Warren Dukes <shank@mercury.chem.pitt.edu> Tue, 06 Oct 2003 22:04:00 -0400 -- Warren Dukes (aka shank) <shank@mercury.chem.pitt.edu> Tue, 06 Oct 2003 22:04:00 -0400
mpd (0.9.1-1) unstable; urgency=low mpd (0.9.1-1) unstable; urgency=low
......
/etc/mpd/conf
#!/bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
# Do you like debian?
db_input medium mpd/systemwide || true
db_go
db_get mpd/systemwide || true
if [ "$RET" = "true" ] ; then
db_input medium mpd/music_directory || true
db_go
db_input medium mpd/playlist_directory || true
db_go
db_input low mpd/port || true
db_go
fi
Source: mpd Source: mpd
Section: sound Section: sound
Priority: optional Priority: optional
Maintainer: Warren Dukes <shank@mercury.chem.pitt.edu> Maintainer: Warren Dukes (aka shank) <shank@mercury.chem.pitt.edu>
Build-Depends: debhelper (>> 4.0.0), libao-dev (>=0.8.3-1), libogg-dev, libvorbis-dev, libflac-dev (>=1.1.0-4), libmad0-dev, libid3tag0-dev Build-Depends: debhelper (>> 4.0.0), libao-dev (>=0.8.3-1), libogg-dev, libvorbis-dev, libflac-dev (>=1.1.0-4), libmad0-dev, libid3tag0-dev, debconf, cdbs, libaudiofile-dev
Standards-Version: 3.5.8 Standards-Version: 3.5.8
Package: mpd Package: mpd
Architecture: any Architecture: any
Depends: ${shlibs:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Music Player Daemon (MPD) Description: Music Player Daemon (MPD)
MPD is a server that allows remote access for playing MPD is a server that allows remote access for playing
music (MP3, Ogg Vorbis, and Flac) and managing playlists. The design focus is music (MP3, Ogg Vorbis, and Flac) and managing playlists. The design focus is
......
#! /bin/sh
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/mpd
DBFILE=/var/run/mpd/mpddb
test -x $DAEMON || exit 0
case "$1" in
start)
if test -f $DBFILE; then
echo -n "Starting Music Player Daemon: mpd"
start-stop-daemon --start --quiet --exec $DAEMON
echo "."
else
echo "MPD db not found, run: $DAEMON --create-db."
fi
;;
stop)
echo -n "Stopping Music Player Daemon: mpd"
start-stop-daemon --stop --quiet --exec $DAEMON || echo -n " ... mpd not running"
echo "."
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/mpd {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
#!/bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
db_get mpd/systemwide || true
if [ "$RET" = "true" ] ; then
echo "# BEGIN - GENERTATED BY DEBCONF" > /etc/mpd.conf
db_get mpd/music_directory || true
echo "music_directory \"$RET\"" >> /etc/mpd.conf
db_get mpd/playlist_directory || true
echo "playlist_directory \"$RET\"" >> /etc/mpd.conf
db_get mpd/port || true
echo "port \"$RET\"" >> /etc/mpd.conf
echo "# END - GENERTATED BY DEBCONF" >> /etc/mpd.conf
echo "" >> /etc/mpd.conf
echo "# Rest included from /etc/mpd/conf" >> /etc/mpd.conf
cat /etc/mpd/conf >> /etc/mpd.conf
chmod 600 /etc/mpd.conf
groupadd mpd > /dev/null 2>&1 || true
useradd -M -g mpd -G mpd,audio mpd > /dev/null 2>&1 || true
mkdir -p /var/log/mpd
chown mpd.mpd /var/log/mpd
chmod 700 /var/log/mpd
mkdir -p /var/lib/mpd
chown mpd.mpd /var/lib/mpd
chmod 700 /var/lib/mpd
# Automatically added by dh_installinit
if [ -x "/etc/init.d/mpd" ]; then
update-rc.d mpd defaults >/dev/null
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d mpd start
else
/etc/init.d/mpd start
fi
fi
# End automatically added section
fi
#!/bin/sh -e
rm -r /var/log/mpd > /dev/null 2>&1 || true
rm -r /var/lib/mpd > /dev/null 2>&1 || true
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
update-rc.d mpd remove defaults >/dev/null
rm -rf /var/log/mpd
rm -rf /var/lib/mpd
rm -f /etc/mpd.conf
fi
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
#!/bin/sh -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/mpd" ]; then
if [ -x /usr/sbin/invoke-rc.d ] ; then
invoke-rc.d mpd stop
else
/etc/init.d/mpd stop
fi
fi
# End automatically added section
#!/usr/bin/make -f #!/usr/bin/make -f
# Sample debian/rules that uses debhelper. include /usr/share/cdbs/1/rules/debhelper.mk
# GNU copyright 1997 to 1999 by Joey Hess. include /usr/share/cdbs/1/class/autotools.mk
# Uncomment this to turn on verbose mode. binary-post-install/mpd::
#export DH_VERBOSE=1 mkdir -p debian/mpd/usr/share/doc/mpd/examples
cp doc/mpdconf.example debian/mpd/usr/share/doc/mpd/examples
mkdir -p debian/mpd/etc/mpd
# These are used for cross-compiling and for saving the configure script echo "#see manpage for mpd for all config options" > debian/mpd/etc/mpd/conf
# from having to guess our platform (since we know it already) echo "log_file \"/var/log/mpd/mpd_log\"" >> debian/mpd/etc/mpd/conf
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) echo "error_file \"/var/log/mpd/mpd_errors\"" >> debian/mpd/etc/mpd/conf
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) echo "db_file \"/var/lib/mpd/mpddb\"" >> debian/mpd/etc/mpd/conf
echo "user \"mpd\"" >> debian/mpd/etc/mpd/conf
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
config.status: configure
dh_testdir
# Add here commands to configure the package.
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
build: build-stamp
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
$(MAKE)
#/usr/bin/docbook-to-man debian/mpd.sgml > mpd.1
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/mpd.
$(MAKE) install DESTDIR=$(CURDIR)/debian/mpd
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples doc/mpdconf.example
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
# dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
Template: mpd/systemwide
Type: boolean
Default: false
Description: Install system mpd service?
You can install mpd as a system daemon. This will create a mpd user and
config file (/etc/mpd.conf). The mpd service will be
started on boot.
Template: mpd/music_directory
Type: string
Default: /usr/share/mpd/music
Description: Music directory for MPD
Which directory do you want MPD to search in for music files?
Template: mpd/playlist_directory
Type: string
Default: /usr/share/mpd/playlists
Description: Music directory for MPD
Which directory do you want MPD to search in for music files?
Template: mpd/port
Type: string
Default: 2100
Description: Port MPD listens on
Which port number do you want MPD to listen on?
...@@ -130,6 +130,7 @@ status ...@@ -130,6 +130,7 @@ status
state: ("play", "stop", or "pause") state: ("play", "stop", or "pause")
song: (current song playing/paused, playlist song number) song: (current song playing/paused, playlist song number)
time: <int elapsed>:<time total> (of current playing/paused song) time: <int elapsed>:<time total> (of current playing/paused song)
bitrate: <int bitrate> (instantaneous bitrate in kbps)
error: if there is an error, returns message here error: if there is an error, returns message here
stop stop
......
...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@ ...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@
AO_LIBS = @AO_LIBS@ AO_LIBS = @AO_LIBS@
AR = @AR@ AR = @AR@
AS = @AS@ AS = @AS@
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCAS = @CCAS@ CCAS = @CCAS@
......
...@@ -124,7 +124,8 @@ This specifies which address MPD binds to and listens on. The default is "any", ...@@ -124,7 +124,8 @@ This specifies which address MPD binds to and listens on. The default is "any",
which binds to all available addresses. which binds to all available addresses.
.SH EXAMPLES .SH EXAMPLES
.TP .TP
Below is an example config file. Below is an example config file. (Note: '#' at the beginning of a line denotes
a comment. The '#' must be the first character/symbol on that line.)
.br .br
.br .br
......
...@@ -127,7 +127,7 @@ then ...@@ -127,7 +127,7 @@ then
echo "install: no input file specified" echo "install: no input file specified"
exit 1 exit 1
else else
: true
fi fi
if [ x"$dir_arg" != x ]; then if [ x"$dir_arg" != x ]; then
...@@ -138,7 +138,7 @@ if [ x"$dir_arg" != x ]; then ...@@ -138,7 +138,7 @@ if [ x"$dir_arg" != x ]; then
instcmd=: instcmd=:
chmodcmd="" chmodcmd=""
else else
instcmd=$mkdirprog instcmd=mkdir
fi fi
else else
...@@ -146,9 +146,9 @@ else ...@@ -146,9 +146,9 @@ else
# might cause directories to be created, which would be especially bad # might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'. # if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ] if [ -f $src -o -d $src ]
then then
: true
else else
echo "install: $src does not exist" echo "install: $src does not exist"
exit 1 exit 1
...@@ -159,7 +159,7 @@ else ...@@ -159,7 +159,7 @@ else
echo "install: no destination specified" echo "install: no destination specified"
exit 1 exit 1
else else
: true
fi fi
# If destination is a directory, append the input filename; if your system # If destination is a directory, append the input filename; if your system
...@@ -169,7 +169,7 @@ else ...@@ -169,7 +169,7 @@ else
then then
dst="$dst"/`basename $src` dst="$dst"/`basename $src`
else else
: true
fi fi
fi fi
...@@ -181,8 +181,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` ...@@ -181,8 +181,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Skip lots of stat calls in the usual case. # Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then if [ ! -d "$dstdir" ]; then
defaultIFS=' defaultIFS='
' '
IFS="${IFS-${defaultIFS}}" IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}" oIFS="${IFS}"
...@@ -201,7 +201,7 @@ while [ $# -ne 0 ] ; do ...@@ -201,7 +201,7 @@ while [ $# -ne 0 ] ; do
then then
$mkdirprog "${pathcomp}" $mkdirprog "${pathcomp}"
else else
: true
fi fi
pathcomp="${pathcomp}/" pathcomp="${pathcomp}/"
...@@ -212,10 +212,10 @@ if [ x"$dir_arg" != x ] ...@@ -212,10 +212,10 @@ if [ x"$dir_arg" != x ]
then then
$doit $instcmd $dst && $doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else else
# If we're going to rename the final executable, determine the name now. # If we're going to rename the final executable, determine the name now.
...@@ -234,7 +234,7 @@ else ...@@ -234,7 +234,7 @@ else
then then
dstfile=`basename $dst` dstfile=`basename $dst`
else else
: true
fi fi
# Make a temp file name in the proper directory. # Make a temp file name in the proper directory.
...@@ -253,10 +253,10 @@ else ...@@ -253,10 +253,10 @@ else
# ignore errors from any of these, just make sure not to ignore # ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command. # errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
......
...@@ -4,53 +4,9 @@ ...@@ -4,53 +4,9 @@
# Created: 1993-05-16 # Created: 1993-05-16
# Public domain # Public domain
errstatus=0 # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* ) # -h for help
echo "${usage}" 1>&2; exit 0 ;;
-m ) # -m PERM arg
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in errstatus=0
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi ;;
esac
for file for file
do do
...@@ -66,24 +22,13 @@ do ...@@ -66,24 +22,13 @@ do
esac esac
if test ! -d "$pathcomp"; then if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr="" mkdir "$pathcomp" || lasterr=$?
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then if test ! -d "$pathcomp"; then
errstatus=$lasterr errstatus=$lasterr
fi fi
fi
fi
fi fi
pathcomp="$pathcomp/" pathcomp="$pathcomp/"
...@@ -92,8 +37,4 @@ done ...@@ -92,8 +37,4 @@ done
exit $errstatus exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 3
# End:
# mkinstalldirs ends here # mkinstalldirs ends here
...@@ -3,12 +3,13 @@ SUBDIRS = $(ID3_SUBDIR) $(MAD_SUBDIR) ...@@ -3,12 +3,13 @@ SUBDIRS = $(ID3_SUBDIR) $(MAD_SUBDIR)
mpd_headers = buffer2array.h interface.h command.h playlist.h ls.h \ mpd_headers = buffer2array.h interface.h command.h playlist.h ls.h \
song.h list.h directory.h tables.h utils.h path.h mp3_decode.h \ song.h list.h directory.h tables.h utils.h path.h mp3_decode.h \
tag.h player.h listen.h conf.h ogg_decode.h volume.h flac_decode.h \ tag.h player.h listen.h conf.h ogg_decode.h volume.h flac_decode.h \
audio.h playerData.h stats.h myfprintf.h sig_handlers.h decode.h log.h audio.h playerData.h stats.h myfprintf.h sig_handlers.h decode.h log.h \
char_conv.h audiofile_decode.h
mpd_SOURCES = main.c buffer2array.c interface.c command.c playlist.c ls.c \ mpd_SOURCES = main.c buffer2array.c interface.c command.c playlist.c ls.c \
song.c list.c directory.c tables.c utils.c path.c mp3_decode.c \ song.c list.c directory.c tables.c utils.c path.c mp3_decode.c \
tag.c player.c listen.c conf.c ogg_decode.c volume.c flac_decode.c \ tag.c player.c listen.c conf.c ogg_decode.c volume.c flac_decode.c \
audio.c playerData.c stats.c myfprintf.c sig_handlers.c decode.c log.c \ audio.c playerData.c stats.c myfprintf.c sig_handlers.c decode.c log.c \
$(mpd_headers) char_conv.c audiofile_decode.c $(mpd_headers)
CFLAGS = @CFLAGS@ $(MPD_CFLAGS) mpd_CFLAGS = $(MPD_CFLAGS)
mpd_LDADD = $(MPD_LIBS) $(ID3_LIB) $(MAD_LIB) mpd_LDADD = $(MPD_LIBS) $(ID3_LIB) $(MAD_LIB)
...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@ ...@@ -70,6 +70,9 @@ AO_CFLAGS = @AO_CFLAGS@
AO_LIBS = @AO_LIBS@ AO_LIBS = @AO_LIBS@
AR = @AR@ AR = @AR@
AS = @AS@ AS = @AS@
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCAS = @CCAS@ CCAS = @CCAS@
...@@ -114,16 +117,17 @@ SUBDIRS = $(ID3_SUBDIR) $(MAD_SUBDIR) ...@@ -114,16 +117,17 @@ SUBDIRS = $(ID3_SUBDIR) $(MAD_SUBDIR)
mpd_headers = buffer2array.h interface.h command.h playlist.h ls.h \ mpd_headers = buffer2array.h interface.h command.h playlist.h ls.h \
song.h list.h directory.h tables.h utils.h path.h mp3_decode.h \ song.h list.h directory.h tables.h utils.h path.h mp3_decode.h \
tag.h player.h listen.h conf.h ogg_decode.h volume.h flac_decode.h \ tag.h player.h listen.h conf.h ogg_decode.h volume.h flac_decode.h \
audio.h playerData.h stats.h myfprintf.h sig_handlers.h decode.h log.h audio.h playerData.h stats.h myfprintf.h sig_handlers.h decode.h log.h \
char_conv.h audiofile_decode.h
mpd_SOURCES = main.c buffer2array.c interface.c command.c playlist.c ls.c \ mpd_SOURCES = main.c buffer2array.c interface.c command.c playlist.c ls.c \
song.c list.c directory.c tables.c utils.c path.c mp3_decode.c \ song.c list.c directory.c tables.c utils.c path.c mp3_decode.c \
tag.c player.c listen.c conf.c ogg_decode.c volume.c flac_decode.c \ tag.c player.c listen.c conf.c ogg_decode.c volume.c flac_decode.c \
audio.c playerData.c stats.c myfprintf.c sig_handlers.c decode.c log.c \ audio.c playerData.c stats.c myfprintf.c sig_handlers.c decode.c log.c \
$(mpd_headers) char_conv.c audiofile_decode.c $(mpd_headers)
CFLAGS = @CFLAGS@ $(MPD_CFLAGS) mpd_CFLAGS = $(MPD_CFLAGS)
mpd_LDADD = $(MPD_LIBS) $(ID3_LIB) $(MAD_LIB) mpd_LDADD = $(MPD_LIBS) $(ID3_LIB) $(MAD_LIB)
subdir = src subdir = src
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
...@@ -132,16 +136,19 @@ bin_PROGRAMS = mpd$(EXEEXT) ...@@ -132,16 +136,19 @@ bin_PROGRAMS = mpd$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) PROGRAMS = $(bin_PROGRAMS)
am__objects_1 = am__objects_1 =
am_mpd_OBJECTS = main.$(OBJEXT) buffer2array.$(OBJEXT) \ am_mpd_OBJECTS = mpd-main.$(OBJEXT) mpd-buffer2array.$(OBJEXT) \
interface.$(OBJEXT) command.$(OBJEXT) playlist.$(OBJEXT) \ mpd-interface.$(OBJEXT) mpd-command.$(OBJEXT) \
ls.$(OBJEXT) song.$(OBJEXT) list.$(OBJEXT) directory.$(OBJEXT) \ mpd-playlist.$(OBJEXT) mpd-ls.$(OBJEXT) mpd-song.$(OBJEXT) \
tables.$(OBJEXT) utils.$(OBJEXT) path.$(OBJEXT) \ mpd-list.$(OBJEXT) mpd-directory.$(OBJEXT) mpd-tables.$(OBJEXT) \
mp3_decode.$(OBJEXT) tag.$(OBJEXT) player.$(OBJEXT) \ mpd-utils.$(OBJEXT) mpd-path.$(OBJEXT) mpd-mp3_decode.$(OBJEXT) \
listen.$(OBJEXT) conf.$(OBJEXT) ogg_decode.$(OBJEXT) \ mpd-tag.$(OBJEXT) mpd-player.$(OBJEXT) mpd-listen.$(OBJEXT) \
volume.$(OBJEXT) flac_decode.$(OBJEXT) audio.$(OBJEXT) \ mpd-conf.$(OBJEXT) mpd-ogg_decode.$(OBJEXT) \
playerData.$(OBJEXT) stats.$(OBJEXT) myfprintf.$(OBJEXT) \ mpd-volume.$(OBJEXT) mpd-flac_decode.$(OBJEXT) \
sig_handlers.$(OBJEXT) decode.$(OBJEXT) log.$(OBJEXT) \ mpd-audio.$(OBJEXT) mpd-playerData.$(OBJEXT) \
$(am__objects_1) mpd-stats.$(OBJEXT) mpd-myfprintf.$(OBJEXT) \
mpd-sig_handlers.$(OBJEXT) mpd-decode.$(OBJEXT) \
mpd-log.$(OBJEXT) mpd-char_conv.$(OBJEXT) \
mpd-audiofile_decode.$(OBJEXT) $(am__objects_1)
mpd_OBJECTS = $(am_mpd_OBJECTS) mpd_OBJECTS = $(am_mpd_OBJECTS)
mpd_DEPENDENCIES = mpd_DEPENDENCIES =
mpd_LDFLAGS = mpd_LDFLAGS =
...@@ -153,20 +160,28 @@ LDFLAGS = @LDFLAGS@ ...@@ -153,20 +160,28 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/audio.Po ./$(DEPDIR)/buffer2array.Po \ @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/mpd-audio.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/command.Po ./$(DEPDIR)/conf.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-audiofile_decode.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/decode.Po ./$(DEPDIR)/directory.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-buffer2array.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/flac_decode.Po ./$(DEPDIR)/interface.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-char_conv.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/list.Po ./$(DEPDIR)/listen.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-command.Po ./$(DEPDIR)/mpd-conf.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/log.Po ./$(DEPDIR)/ls.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-decode.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/mp3_decode.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-directory.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/myfprintf.Po ./$(DEPDIR)/ogg_decode.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-flac_decode.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/path.Po ./$(DEPDIR)/player.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-interface.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/playerData.Po ./$(DEPDIR)/playlist.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-list.Po ./$(DEPDIR)/mpd-listen.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/sig_handlers.Po ./$(DEPDIR)/song.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-log.Po ./$(DEPDIR)/mpd-ls.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/stats.Po ./$(DEPDIR)/tables.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-main.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/tag.Po ./$(DEPDIR)/utils.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpd-mp3_decode.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/volume.Po @AMDEP_TRUE@ ./$(DEPDIR)/mpd-myfprintf.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-ogg_decode.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-path.Po ./$(DEPDIR)/mpd-player.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-playerData.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-playlist.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-sig_handlers.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-song.Po ./$(DEPDIR)/mpd-stats.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-tables.Po ./$(DEPDIR)/mpd-tag.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mpd-utils.Po ./$(DEPDIR)/mpd-volume.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
...@@ -174,6 +189,7 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ ...@@ -174,6 +189,7 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@ $(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
DIST_SOURCES = $(mpd_SOURCES) DIST_SOURCES = $(mpd_SOURCES)
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
...@@ -222,6 +238,35 @@ clean-binPROGRAMS: ...@@ -222,6 +238,35 @@ clean-binPROGRAMS:
echo " rm -f $$p $$f"; \ echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \ rm -f $$p $$f ; \
done done
mpd-main.$(OBJEXT): main.c
mpd-buffer2array.$(OBJEXT): buffer2array.c
mpd-interface.$(OBJEXT): interface.c
mpd-command.$(OBJEXT): command.c
mpd-playlist.$(OBJEXT): playlist.c
mpd-ls.$(OBJEXT): ls.c
mpd-song.$(OBJEXT): song.c
mpd-list.$(OBJEXT): list.c
mpd-directory.$(OBJEXT): directory.c
mpd-tables.$(OBJEXT): tables.c
mpd-utils.$(OBJEXT): utils.c
mpd-path.$(OBJEXT): path.c
mpd-mp3_decode.$(OBJEXT): mp3_decode.c
mpd-tag.$(OBJEXT): tag.c
mpd-player.$(OBJEXT): player.c
mpd-listen.$(OBJEXT): listen.c
mpd-conf.$(OBJEXT): conf.c
mpd-ogg_decode.$(OBJEXT): ogg_decode.c
mpd-volume.$(OBJEXT): volume.c
mpd-flac_decode.$(OBJEXT): flac_decode.c
mpd-audio.$(OBJEXT): audio.c
mpd-playerData.$(OBJEXT): playerData.c
mpd-stats.$(OBJEXT): stats.c
mpd-myfprintf.$(OBJEXT): myfprintf.c
mpd-sig_handlers.$(OBJEXT): sig_handlers.c
mpd-decode.$(OBJEXT): decode.c
mpd-log.$(OBJEXT): log.c
mpd-char_conv.$(OBJEXT): char_conv.c
mpd-audiofile_decode.$(OBJEXT): audiofile_decode.c
mpd$(EXEEXT): $(mpd_OBJECTS) $(mpd_DEPENDENCIES) mpd$(EXEEXT): $(mpd_OBJECTS) $(mpd_DEPENDENCIES)
@rm -f mpd$(EXEEXT) @rm -f mpd$(EXEEXT)
$(LINK) $(mpd_LDFLAGS) $(mpd_OBJECTS) $(mpd_LDADD) $(LIBS) $(LINK) $(mpd_LDFLAGS) $(mpd_OBJECTS) $(mpd_LDADD) $(LIBS)
...@@ -232,33 +277,35 @@ mostlyclean-compile: ...@@ -232,33 +277,35 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-audio.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer2array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-audiofile_decode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-buffer2array.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-char_conv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-command.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/directory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-conf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flac_decode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-decode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-directory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-flac_decode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-interface.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-listen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mp3_decode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-ls.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myfprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_decode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-mp3_decode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-myfprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-ogg_decode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playerData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-path.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-player.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig_handlers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-playerData.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/song.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-playlist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-sig_handlers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-song.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-stats.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-tables.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volume.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-tag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-utils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-volume.Po@am__quote@
distclean-depend: distclean-depend:
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
...@@ -280,6 +327,528 @@ distclean-depend: ...@@ -280,6 +327,528 @@ distclean-depend:
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
mpd-main.o: main.c
@AMDEP_TRUE@ source='main.c' object='mpd-main.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-main.Po' tmpdepfile='$(DEPDIR)/mpd-main.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
mpd-main.obj: main.c
@AMDEP_TRUE@ source='main.c' object='mpd-main.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-main.Po' tmpdepfile='$(DEPDIR)/mpd-main.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-main.obj `cygpath -w main.c`
mpd-main.lo: main.c
@AMDEP_TRUE@ source='main.c' object='mpd-main.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-main.Plo' tmpdepfile='$(DEPDIR)/mpd-main.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-main.lo `test -f 'main.c' || echo '$(srcdir)/'`main.c
mpd-buffer2array.o: buffer2array.c
@AMDEP_TRUE@ source='buffer2array.c' object='mpd-buffer2array.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-buffer2array.Po' tmpdepfile='$(DEPDIR)/mpd-buffer2array.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-buffer2array.o `test -f 'buffer2array.c' || echo '$(srcdir)/'`buffer2array.c
mpd-buffer2array.obj: buffer2array.c
@AMDEP_TRUE@ source='buffer2array.c' object='mpd-buffer2array.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-buffer2array.Po' tmpdepfile='$(DEPDIR)/mpd-buffer2array.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-buffer2array.obj `cygpath -w buffer2array.c`
mpd-buffer2array.lo: buffer2array.c
@AMDEP_TRUE@ source='buffer2array.c' object='mpd-buffer2array.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-buffer2array.Plo' tmpdepfile='$(DEPDIR)/mpd-buffer2array.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-buffer2array.lo `test -f 'buffer2array.c' || echo '$(srcdir)/'`buffer2array.c
mpd-interface.o: interface.c
@AMDEP_TRUE@ source='interface.c' object='mpd-interface.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-interface.Po' tmpdepfile='$(DEPDIR)/mpd-interface.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-interface.o `test -f 'interface.c' || echo '$(srcdir)/'`interface.c
mpd-interface.obj: interface.c
@AMDEP_TRUE@ source='interface.c' object='mpd-interface.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-interface.Po' tmpdepfile='$(DEPDIR)/mpd-interface.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-interface.obj `cygpath -w interface.c`
mpd-interface.lo: interface.c
@AMDEP_TRUE@ source='interface.c' object='mpd-interface.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-interface.Plo' tmpdepfile='$(DEPDIR)/mpd-interface.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-interface.lo `test -f 'interface.c' || echo '$(srcdir)/'`interface.c
mpd-command.o: command.c
@AMDEP_TRUE@ source='command.c' object='mpd-command.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-command.Po' tmpdepfile='$(DEPDIR)/mpd-command.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-command.o `test -f 'command.c' || echo '$(srcdir)/'`command.c
mpd-command.obj: command.c
@AMDEP_TRUE@ source='command.c' object='mpd-command.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-command.Po' tmpdepfile='$(DEPDIR)/mpd-command.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-command.obj `cygpath -w command.c`
mpd-command.lo: command.c
@AMDEP_TRUE@ source='command.c' object='mpd-command.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-command.Plo' tmpdepfile='$(DEPDIR)/mpd-command.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-command.lo `test -f 'command.c' || echo '$(srcdir)/'`command.c
mpd-playlist.o: playlist.c
@AMDEP_TRUE@ source='playlist.c' object='mpd-playlist.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-playlist.Po' tmpdepfile='$(DEPDIR)/mpd-playlist.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-playlist.o `test -f 'playlist.c' || echo '$(srcdir)/'`playlist.c
mpd-playlist.obj: playlist.c
@AMDEP_TRUE@ source='playlist.c' object='mpd-playlist.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-playlist.Po' tmpdepfile='$(DEPDIR)/mpd-playlist.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-playlist.obj `cygpath -w playlist.c`
mpd-playlist.lo: playlist.c
@AMDEP_TRUE@ source='playlist.c' object='mpd-playlist.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-playlist.Plo' tmpdepfile='$(DEPDIR)/mpd-playlist.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-playlist.lo `test -f 'playlist.c' || echo '$(srcdir)/'`playlist.c
mpd-ls.o: ls.c
@AMDEP_TRUE@ source='ls.c' object='mpd-ls.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-ls.Po' tmpdepfile='$(DEPDIR)/mpd-ls.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-ls.o `test -f 'ls.c' || echo '$(srcdir)/'`ls.c
mpd-ls.obj: ls.c
@AMDEP_TRUE@ source='ls.c' object='mpd-ls.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-ls.Po' tmpdepfile='$(DEPDIR)/mpd-ls.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-ls.obj `cygpath -w ls.c`
mpd-ls.lo: ls.c
@AMDEP_TRUE@ source='ls.c' object='mpd-ls.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-ls.Plo' tmpdepfile='$(DEPDIR)/mpd-ls.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-ls.lo `test -f 'ls.c' || echo '$(srcdir)/'`ls.c
mpd-song.o: song.c
@AMDEP_TRUE@ source='song.c' object='mpd-song.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-song.Po' tmpdepfile='$(DEPDIR)/mpd-song.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-song.o `test -f 'song.c' || echo '$(srcdir)/'`song.c
mpd-song.obj: song.c
@AMDEP_TRUE@ source='song.c' object='mpd-song.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-song.Po' tmpdepfile='$(DEPDIR)/mpd-song.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-song.obj `cygpath -w song.c`
mpd-song.lo: song.c
@AMDEP_TRUE@ source='song.c' object='mpd-song.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-song.Plo' tmpdepfile='$(DEPDIR)/mpd-song.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-song.lo `test -f 'song.c' || echo '$(srcdir)/'`song.c
mpd-list.o: list.c
@AMDEP_TRUE@ source='list.c' object='mpd-list.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-list.Po' tmpdepfile='$(DEPDIR)/mpd-list.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
mpd-list.obj: list.c
@AMDEP_TRUE@ source='list.c' object='mpd-list.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-list.Po' tmpdepfile='$(DEPDIR)/mpd-list.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-list.obj `cygpath -w list.c`
mpd-list.lo: list.c
@AMDEP_TRUE@ source='list.c' object='mpd-list.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-list.Plo' tmpdepfile='$(DEPDIR)/mpd-list.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-list.lo `test -f 'list.c' || echo '$(srcdir)/'`list.c
mpd-directory.o: directory.c
@AMDEP_TRUE@ source='directory.c' object='mpd-directory.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-directory.Po' tmpdepfile='$(DEPDIR)/mpd-directory.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-directory.o `test -f 'directory.c' || echo '$(srcdir)/'`directory.c
mpd-directory.obj: directory.c
@AMDEP_TRUE@ source='directory.c' object='mpd-directory.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-directory.Po' tmpdepfile='$(DEPDIR)/mpd-directory.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-directory.obj `cygpath -w directory.c`
mpd-directory.lo: directory.c
@AMDEP_TRUE@ source='directory.c' object='mpd-directory.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-directory.Plo' tmpdepfile='$(DEPDIR)/mpd-directory.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-directory.lo `test -f 'directory.c' || echo '$(srcdir)/'`directory.c
mpd-tables.o: tables.c
@AMDEP_TRUE@ source='tables.c' object='mpd-tables.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-tables.Po' tmpdepfile='$(DEPDIR)/mpd-tables.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-tables.o `test -f 'tables.c' || echo '$(srcdir)/'`tables.c
mpd-tables.obj: tables.c
@AMDEP_TRUE@ source='tables.c' object='mpd-tables.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-tables.Po' tmpdepfile='$(DEPDIR)/mpd-tables.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-tables.obj `cygpath -w tables.c`
mpd-tables.lo: tables.c
@AMDEP_TRUE@ source='tables.c' object='mpd-tables.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-tables.Plo' tmpdepfile='$(DEPDIR)/mpd-tables.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-tables.lo `test -f 'tables.c' || echo '$(srcdir)/'`tables.c
mpd-utils.o: utils.c
@AMDEP_TRUE@ source='utils.c' object='mpd-utils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-utils.Po' tmpdepfile='$(DEPDIR)/mpd-utils.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c
mpd-utils.obj: utils.c
@AMDEP_TRUE@ source='utils.c' object='mpd-utils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-utils.Po' tmpdepfile='$(DEPDIR)/mpd-utils.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-utils.obj `cygpath -w utils.c`
mpd-utils.lo: utils.c
@AMDEP_TRUE@ source='utils.c' object='mpd-utils.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-utils.Plo' tmpdepfile='$(DEPDIR)/mpd-utils.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-utils.lo `test -f 'utils.c' || echo '$(srcdir)/'`utils.c
mpd-path.o: path.c
@AMDEP_TRUE@ source='path.c' object='mpd-path.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-path.Po' tmpdepfile='$(DEPDIR)/mpd-path.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-path.o `test -f 'path.c' || echo '$(srcdir)/'`path.c
mpd-path.obj: path.c
@AMDEP_TRUE@ source='path.c' object='mpd-path.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-path.Po' tmpdepfile='$(DEPDIR)/mpd-path.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-path.obj `cygpath -w path.c`
mpd-path.lo: path.c
@AMDEP_TRUE@ source='path.c' object='mpd-path.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-path.Plo' tmpdepfile='$(DEPDIR)/mpd-path.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-path.lo `test -f 'path.c' || echo '$(srcdir)/'`path.c
mpd-mp3_decode.o: mp3_decode.c
@AMDEP_TRUE@ source='mp3_decode.c' object='mpd-mp3_decode.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-mp3_decode.Po' tmpdepfile='$(DEPDIR)/mpd-mp3_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-mp3_decode.o `test -f 'mp3_decode.c' || echo '$(srcdir)/'`mp3_decode.c
mpd-mp3_decode.obj: mp3_decode.c
@AMDEP_TRUE@ source='mp3_decode.c' object='mpd-mp3_decode.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-mp3_decode.Po' tmpdepfile='$(DEPDIR)/mpd-mp3_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-mp3_decode.obj `cygpath -w mp3_decode.c`
mpd-mp3_decode.lo: mp3_decode.c
@AMDEP_TRUE@ source='mp3_decode.c' object='mpd-mp3_decode.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-mp3_decode.Plo' tmpdepfile='$(DEPDIR)/mpd-mp3_decode.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-mp3_decode.lo `test -f 'mp3_decode.c' || echo '$(srcdir)/'`mp3_decode.c
mpd-tag.o: tag.c
@AMDEP_TRUE@ source='tag.c' object='mpd-tag.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-tag.Po' tmpdepfile='$(DEPDIR)/mpd-tag.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-tag.o `test -f 'tag.c' || echo '$(srcdir)/'`tag.c
mpd-tag.obj: tag.c
@AMDEP_TRUE@ source='tag.c' object='mpd-tag.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-tag.Po' tmpdepfile='$(DEPDIR)/mpd-tag.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-tag.obj `cygpath -w tag.c`
mpd-tag.lo: tag.c
@AMDEP_TRUE@ source='tag.c' object='mpd-tag.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-tag.Plo' tmpdepfile='$(DEPDIR)/mpd-tag.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-tag.lo `test -f 'tag.c' || echo '$(srcdir)/'`tag.c
mpd-player.o: player.c
@AMDEP_TRUE@ source='player.c' object='mpd-player.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-player.Po' tmpdepfile='$(DEPDIR)/mpd-player.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-player.o `test -f 'player.c' || echo '$(srcdir)/'`player.c
mpd-player.obj: player.c
@AMDEP_TRUE@ source='player.c' object='mpd-player.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-player.Po' tmpdepfile='$(DEPDIR)/mpd-player.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-player.obj `cygpath -w player.c`
mpd-player.lo: player.c
@AMDEP_TRUE@ source='player.c' object='mpd-player.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-player.Plo' tmpdepfile='$(DEPDIR)/mpd-player.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-player.lo `test -f 'player.c' || echo '$(srcdir)/'`player.c
mpd-listen.o: listen.c
@AMDEP_TRUE@ source='listen.c' object='mpd-listen.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-listen.Po' tmpdepfile='$(DEPDIR)/mpd-listen.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-listen.o `test -f 'listen.c' || echo '$(srcdir)/'`listen.c
mpd-listen.obj: listen.c
@AMDEP_TRUE@ source='listen.c' object='mpd-listen.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-listen.Po' tmpdepfile='$(DEPDIR)/mpd-listen.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-listen.obj `cygpath -w listen.c`
mpd-listen.lo: listen.c
@AMDEP_TRUE@ source='listen.c' object='mpd-listen.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-listen.Plo' tmpdepfile='$(DEPDIR)/mpd-listen.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-listen.lo `test -f 'listen.c' || echo '$(srcdir)/'`listen.c
mpd-conf.o: conf.c
@AMDEP_TRUE@ source='conf.c' object='mpd-conf.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-conf.Po' tmpdepfile='$(DEPDIR)/mpd-conf.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-conf.o `test -f 'conf.c' || echo '$(srcdir)/'`conf.c
mpd-conf.obj: conf.c
@AMDEP_TRUE@ source='conf.c' object='mpd-conf.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-conf.Po' tmpdepfile='$(DEPDIR)/mpd-conf.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-conf.obj `cygpath -w conf.c`
mpd-conf.lo: conf.c
@AMDEP_TRUE@ source='conf.c' object='mpd-conf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-conf.Plo' tmpdepfile='$(DEPDIR)/mpd-conf.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c
mpd-ogg_decode.o: ogg_decode.c
@AMDEP_TRUE@ source='ogg_decode.c' object='mpd-ogg_decode.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-ogg_decode.Po' tmpdepfile='$(DEPDIR)/mpd-ogg_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-ogg_decode.o `test -f 'ogg_decode.c' || echo '$(srcdir)/'`ogg_decode.c
mpd-ogg_decode.obj: ogg_decode.c
@AMDEP_TRUE@ source='ogg_decode.c' object='mpd-ogg_decode.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-ogg_decode.Po' tmpdepfile='$(DEPDIR)/mpd-ogg_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-ogg_decode.obj `cygpath -w ogg_decode.c`
mpd-ogg_decode.lo: ogg_decode.c
@AMDEP_TRUE@ source='ogg_decode.c' object='mpd-ogg_decode.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-ogg_decode.Plo' tmpdepfile='$(DEPDIR)/mpd-ogg_decode.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-ogg_decode.lo `test -f 'ogg_decode.c' || echo '$(srcdir)/'`ogg_decode.c
mpd-volume.o: volume.c
@AMDEP_TRUE@ source='volume.c' object='mpd-volume.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-volume.Po' tmpdepfile='$(DEPDIR)/mpd-volume.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-volume.o `test -f 'volume.c' || echo '$(srcdir)/'`volume.c
mpd-volume.obj: volume.c
@AMDEP_TRUE@ source='volume.c' object='mpd-volume.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-volume.Po' tmpdepfile='$(DEPDIR)/mpd-volume.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-volume.obj `cygpath -w volume.c`
mpd-volume.lo: volume.c
@AMDEP_TRUE@ source='volume.c' object='mpd-volume.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-volume.Plo' tmpdepfile='$(DEPDIR)/mpd-volume.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-volume.lo `test -f 'volume.c' || echo '$(srcdir)/'`volume.c
mpd-flac_decode.o: flac_decode.c
@AMDEP_TRUE@ source='flac_decode.c' object='mpd-flac_decode.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-flac_decode.Po' tmpdepfile='$(DEPDIR)/mpd-flac_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-flac_decode.o `test -f 'flac_decode.c' || echo '$(srcdir)/'`flac_decode.c
mpd-flac_decode.obj: flac_decode.c
@AMDEP_TRUE@ source='flac_decode.c' object='mpd-flac_decode.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-flac_decode.Po' tmpdepfile='$(DEPDIR)/mpd-flac_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-flac_decode.obj `cygpath -w flac_decode.c`
mpd-flac_decode.lo: flac_decode.c
@AMDEP_TRUE@ source='flac_decode.c' object='mpd-flac_decode.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-flac_decode.Plo' tmpdepfile='$(DEPDIR)/mpd-flac_decode.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-flac_decode.lo `test -f 'flac_decode.c' || echo '$(srcdir)/'`flac_decode.c
mpd-audio.o: audio.c
@AMDEP_TRUE@ source='audio.c' object='mpd-audio.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-audio.Po' tmpdepfile='$(DEPDIR)/mpd-audio.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-audio.o `test -f 'audio.c' || echo '$(srcdir)/'`audio.c
mpd-audio.obj: audio.c
@AMDEP_TRUE@ source='audio.c' object='mpd-audio.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-audio.Po' tmpdepfile='$(DEPDIR)/mpd-audio.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-audio.obj `cygpath -w audio.c`
mpd-audio.lo: audio.c
@AMDEP_TRUE@ source='audio.c' object='mpd-audio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-audio.Plo' tmpdepfile='$(DEPDIR)/mpd-audio.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-audio.lo `test -f 'audio.c' || echo '$(srcdir)/'`audio.c
mpd-playerData.o: playerData.c
@AMDEP_TRUE@ source='playerData.c' object='mpd-playerData.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-playerData.Po' tmpdepfile='$(DEPDIR)/mpd-playerData.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-playerData.o `test -f 'playerData.c' || echo '$(srcdir)/'`playerData.c
mpd-playerData.obj: playerData.c
@AMDEP_TRUE@ source='playerData.c' object='mpd-playerData.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-playerData.Po' tmpdepfile='$(DEPDIR)/mpd-playerData.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-playerData.obj `cygpath -w playerData.c`
mpd-playerData.lo: playerData.c
@AMDEP_TRUE@ source='playerData.c' object='mpd-playerData.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-playerData.Plo' tmpdepfile='$(DEPDIR)/mpd-playerData.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-playerData.lo `test -f 'playerData.c' || echo '$(srcdir)/'`playerData.c
mpd-stats.o: stats.c
@AMDEP_TRUE@ source='stats.c' object='mpd-stats.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-stats.Po' tmpdepfile='$(DEPDIR)/mpd-stats.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-stats.o `test -f 'stats.c' || echo '$(srcdir)/'`stats.c
mpd-stats.obj: stats.c
@AMDEP_TRUE@ source='stats.c' object='mpd-stats.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-stats.Po' tmpdepfile='$(DEPDIR)/mpd-stats.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-stats.obj `cygpath -w stats.c`
mpd-stats.lo: stats.c
@AMDEP_TRUE@ source='stats.c' object='mpd-stats.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-stats.Plo' tmpdepfile='$(DEPDIR)/mpd-stats.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-stats.lo `test -f 'stats.c' || echo '$(srcdir)/'`stats.c
mpd-myfprintf.o: myfprintf.c
@AMDEP_TRUE@ source='myfprintf.c' object='mpd-myfprintf.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-myfprintf.Po' tmpdepfile='$(DEPDIR)/mpd-myfprintf.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-myfprintf.o `test -f 'myfprintf.c' || echo '$(srcdir)/'`myfprintf.c
mpd-myfprintf.obj: myfprintf.c
@AMDEP_TRUE@ source='myfprintf.c' object='mpd-myfprintf.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-myfprintf.Po' tmpdepfile='$(DEPDIR)/mpd-myfprintf.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-myfprintf.obj `cygpath -w myfprintf.c`
mpd-myfprintf.lo: myfprintf.c
@AMDEP_TRUE@ source='myfprintf.c' object='mpd-myfprintf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-myfprintf.Plo' tmpdepfile='$(DEPDIR)/mpd-myfprintf.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-myfprintf.lo `test -f 'myfprintf.c' || echo '$(srcdir)/'`myfprintf.c
mpd-sig_handlers.o: sig_handlers.c
@AMDEP_TRUE@ source='sig_handlers.c' object='mpd-sig_handlers.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-sig_handlers.Po' tmpdepfile='$(DEPDIR)/mpd-sig_handlers.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-sig_handlers.o `test -f 'sig_handlers.c' || echo '$(srcdir)/'`sig_handlers.c
mpd-sig_handlers.obj: sig_handlers.c
@AMDEP_TRUE@ source='sig_handlers.c' object='mpd-sig_handlers.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-sig_handlers.Po' tmpdepfile='$(DEPDIR)/mpd-sig_handlers.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-sig_handlers.obj `cygpath -w sig_handlers.c`
mpd-sig_handlers.lo: sig_handlers.c
@AMDEP_TRUE@ source='sig_handlers.c' object='mpd-sig_handlers.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-sig_handlers.Plo' tmpdepfile='$(DEPDIR)/mpd-sig_handlers.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-sig_handlers.lo `test -f 'sig_handlers.c' || echo '$(srcdir)/'`sig_handlers.c
mpd-decode.o: decode.c
@AMDEP_TRUE@ source='decode.c' object='mpd-decode.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-decode.Po' tmpdepfile='$(DEPDIR)/mpd-decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-decode.o `test -f 'decode.c' || echo '$(srcdir)/'`decode.c
mpd-decode.obj: decode.c
@AMDEP_TRUE@ source='decode.c' object='mpd-decode.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-decode.Po' tmpdepfile='$(DEPDIR)/mpd-decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-decode.obj `cygpath -w decode.c`
mpd-decode.lo: decode.c
@AMDEP_TRUE@ source='decode.c' object='mpd-decode.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-decode.Plo' tmpdepfile='$(DEPDIR)/mpd-decode.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-decode.lo `test -f 'decode.c' || echo '$(srcdir)/'`decode.c
mpd-log.o: log.c
@AMDEP_TRUE@ source='log.c' object='mpd-log.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-log.Po' tmpdepfile='$(DEPDIR)/mpd-log.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c
mpd-log.obj: log.c
@AMDEP_TRUE@ source='log.c' object='mpd-log.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-log.Po' tmpdepfile='$(DEPDIR)/mpd-log.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-log.obj `cygpath -w log.c`
mpd-log.lo: log.c
@AMDEP_TRUE@ source='log.c' object='mpd-log.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-log.Plo' tmpdepfile='$(DEPDIR)/mpd-log.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c
mpd-char_conv.o: char_conv.c
@AMDEP_TRUE@ source='char_conv.c' object='mpd-char_conv.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-char_conv.Po' tmpdepfile='$(DEPDIR)/mpd-char_conv.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-char_conv.o `test -f 'char_conv.c' || echo '$(srcdir)/'`char_conv.c
mpd-char_conv.obj: char_conv.c
@AMDEP_TRUE@ source='char_conv.c' object='mpd-char_conv.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-char_conv.Po' tmpdepfile='$(DEPDIR)/mpd-char_conv.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-char_conv.obj `cygpath -w char_conv.c`
mpd-char_conv.lo: char_conv.c
@AMDEP_TRUE@ source='char_conv.c' object='mpd-char_conv.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-char_conv.Plo' tmpdepfile='$(DEPDIR)/mpd-char_conv.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-char_conv.lo `test -f 'char_conv.c' || echo '$(srcdir)/'`char_conv.c
mpd-audiofile_decode.o: audiofile_decode.c
@AMDEP_TRUE@ source='audiofile_decode.c' object='mpd-audiofile_decode.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-audiofile_decode.Po' tmpdepfile='$(DEPDIR)/mpd-audiofile_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-audiofile_decode.o `test -f 'audiofile_decode.c' || echo '$(srcdir)/'`audiofile_decode.c
mpd-audiofile_decode.obj: audiofile_decode.c
@AMDEP_TRUE@ source='audiofile_decode.c' object='mpd-audiofile_decode.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-audiofile_decode.Po' tmpdepfile='$(DEPDIR)/mpd-audiofile_decode.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-audiofile_decode.obj `cygpath -w audiofile_decode.c`
mpd-audiofile_decode.lo: audiofile_decode.c
@AMDEP_TRUE@ source='audiofile_decode.c' object='mpd-audiofile_decode.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/mpd-audiofile_decode.Plo' tmpdepfile='$(DEPDIR)/mpd-audiofile_decode.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mpd_CFLAGS) $(CFLAGS) -c -o mpd-audiofile_decode.lo `test -f 'audiofile_decode.c' || echo '$(srcdir)/'`audiofile_decode.c
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
mostlyclean-libtool: mostlyclean-libtool:
......
/* the Music Player Daemon (MPD)
* (c)2003 by Warren Dukes (shank@mercury.chem.pitt.edu)
* This project's homepage is: http://www.musicpd.org
*
* libaudiofile (wave) support added by Eric Wong <normalperson@yhbt.net>
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef HAVE_AUDIOFILE
#include "audiofile_decode.h"
#include "command.h"
#include "utils.h"
#include "audio.h"
#include "log.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <audiofile.h>
int getAudiofileTotalTime(char * file)
{
int time;
AFfilehandle af_fp = afOpenFile(file, "r", NULL);
if(af_fp == AF_NULL_FILEHANDLE) {
return -1;
}
time = (int)
((double)afGetFrameCount(af_fp,AF_DEFAULT_TRACK)
/afGetRate(af_fp,AF_DEFAULT_TRACK));
afCloseFile(af_fp);
return time;
}
int audiofile_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc)
{
int fs, frame_count;
AFfilehandle af_fp;
af_fp = afOpenFile(dc->file,"r", NULL);
if(af_fp == AF_NULL_FILEHANDLE) {
ERROR1("failed to open %s\n",dc->file);
return -1;
}
afGetSampleFormat(af_fp, AF_DEFAULT_TRACK, &fs, &af->bits);
af->sampleRate = (int)afGetRate(af_fp, AF_DEFAULT_TRACK);
af->channels = afGetChannels(af_fp,AF_DEFAULT_TRACK);
frame_count = afGetFrameCount(af_fp,AF_DEFAULT_TRACK);
cb->totalTime = ((float)frame_count/(float)af->sampleRate);
if (af->bits != 8 && af->bits != 16) {
ERROR2("Only 8 and 16-bit files are supported. %s is %i-bit\n",
dc->file,af->bits);
afCloseFile(af_fp);
return -1;
}
fs = (int)afGetFrameSize(af_fp, AF_DEFAULT_TRACK,1);
dc->state = DECODE_STATE_DECODE;
dc->start = 0;
{
int ret, eof = 0, current = 0;
unsigned char chunk[CHUNK_SIZE];
while(!eof) {
if(dc->seek) {
cb->end = 0;
cb->wrap = 0;
current = dc->seekWhere * af->sampleRate;
afSeekFrame(af_fp, AF_DEFAULT_TRACK,current);
dc->seek = 0;
}
ret = afReadFrames(af_fp, AF_DEFAULT_TRACK, chunk, CHUNK_SIZE/fs);
if(ret<=0) eof = 1;
else {
while(cb->begin==cb->end && cb->wrap &&
!dc->stop && !dc->seek){
usleep(1000);
}
if(dc->stop) break;
else if(dc->seek) continue;
memcpy(cb->chunks[cb->end],chunk,CHUNK_SIZE);
cb->chunkSize[cb->end] = CHUNK_SIZE;
current += ret;
cb->times[cb->end] = (float)current/(float)af->sampleRate;
++cb->end;
if(cb->end>=BUFFERED_CHUNKS) {
cb->end = 0;
cb->wrap = 1;
}
}
}
if(dc->seek) dc->seek = 0;
if(dc->stop) {
dc->state = DECODE_STATE_STOP;
dc->stop = 0;
}
else dc->state = DECODE_STATE_STOP;
}
afCloseFile(af_fp);
return 0;
}
#endif /* HAVE_AUDIOFILE */
/* the Music Player Daemon (MPD)
* (c)2003 by Warren Dukes (shank@mercury.chem.pitt.edu)
* This project's homepage is: http://www.musicpd.org
*
* libaudiofile (wave) support added by Eric Wong <normalperson@yhbt.net>
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef AUDIOFILE_DECODE_H
#define AUDIOFILE_DECODE_H
#ifdef HAVE_AUDIOFILE
#include "playerData.h"
int audiofile_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc);
int getAudiofileTotalTime(char * file);
#endif /* HAVE_AUDIOFILE */
#endif /* AUDIOFILE_DECODE_H */
/* the Music Player Daemon (MPD)
* (c)2003 by Warren Dukes (shank@mercury.chem.pitt.edu)
* This project's homepage is: http://www.musicpd.org
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "char_conv.h"
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#ifdef HAVE_ICONV
#include <iconv.h>
iconv_t char_conv_iconv;
char * char_conv_to = NULL;
char * char_conv_from = NULL;
#endif
#define BUFFER_SIZE 1024
int setCharSetConversion(char * to, char * from) {
#ifdef HAVE_ICONV
if(char_conv_to && strcmp(to,char_conv_to)==0 &&
char_conv_from && strcmp(from,char_conv_from)==0)
{
return 0;
}
closeCharSetConversion();
if((char_conv_iconv = iconv_open(to,from))==(iconv_t)(-1)) return -1;
char_conv_to = strdup(to);
char_conv_from = strdup(from);
return 0;
#endif
return -1;
}
char * convStrDup(char * string) {
#ifdef HAVE_ICONV
char buffer[BUFFER_SIZE];
int inleft = strlen(string);
char * ret;
int outleft;
int retlen = 0;
size_t err;
char * bufferPtr;
if(!char_conv_to) return NULL;
ret = strdup("");
while(inleft) {
bufferPtr = buffer;
outleft = BUFFER_SIZE;
err = iconv(char_conv_iconv,&string,&inleft,&bufferPtr,
&outleft);
if(outleft==BUFFER_SIZE || (err<0 && errno!=E2BIG)) {
free(ret);
return NULL;
}
ret = realloc(ret,retlen+BUFFER_SIZE-outleft+1);
strncpy(&(ret[retlen]),buffer,BUFFER_SIZE-outleft);
retlen+=BUFFER_SIZE-outleft;
ret[retlen] = '\0';
}
return ret;
#endif
return NULL;
}
void closeCharSetConversion() {
#ifdef HAVE_ICONV
if(char_conv_to) {
iconv_close(char_conv_iconv);
free(char_conv_to);
free(char_conv_from);
char_conv_to = NULL;
char_conv_from = NULL;
}
#endif
}
/* the Music Player Daemon (MPD)
* (c)2003 by Warren Dukes (shank@mercury.chem.pitt.edu)
* This project's homepage is: http://www.musicpd.org
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef CHAR_CONV_H
#define CHAR_CONV_H
int setCharSetConversion(char * to, char * from);
char * convStrDup(char * string);
void closeCharSetConversion();
#endif
...@@ -31,421 +31,417 @@ ...@@ -31,421 +31,417 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#define COMMAND_PLAY "play" #define COMMAND_PLAY "play"
#define COMMAND_STOP "stop" #define COMMAND_STOP "stop"
#define COMMAND_PAUSE "pause" #define COMMAND_PAUSE "pause"
#define COMMAND_STATUS "status" #define COMMAND_STATUS "status"
#define COMMAND_KILL "kill" #define COMMAND_KILL "kill"
#define COMMAND_CLOSE "close" #define COMMAND_CLOSE "close"
#define COMMAND_ADD "add" #define COMMAND_ADD "add"
#define COMMAND_DELETE "delete" #define COMMAND_DELETE "delete"
#define COMMAND_PLAYLIST "playlist" #define COMMAND_PLAYLIST "playlist"
#define COMMAND_SHUFFLE "shuffle" #define COMMAND_SHUFFLE "shuffle"
#define COMMAND_CLEAR "clear" #define COMMAND_CLEAR "clear"
#define COMMAND_SAVE "save" #define COMMAND_SAVE "save"
#define COMMAND_LOAD "load" #define COMMAND_LOAD "load"
#define COMMAND_LS "ls" #define COMMAND_LS "ls"
#define COMMAND_LSINFO "lsinfo" #define COMMAND_LSINFO "lsinfo"
#define COMMAND_RM "rm" #define COMMAND_RM "rm"
#define COMMAND_PLAYLISTINFO "playlistinfo" #define COMMAND_PLAYLISTINFO "playlistinfo"
#define COMMAND_FIND "find" #define COMMAND_FIND "find"
#define COMMAND_SEARCH "search" #define COMMAND_SEARCH "search"
#define COMMAND_UPDATE "update" #define COMMAND_UPDATE "update"
#define COMMAND_NEXT "next" #define COMMAND_NEXT "next"
#define COMMAND_PREVIOUS "previous" #define COMMAND_PREVIOUS "previous"
#define COMMAND_LISTALL "listall" #define COMMAND_LISTALL "listall"
#define COMMAND_VOLUME "volume" #define COMMAND_VOLUME "volume"
#define COMMAND_REPEAT "repeat" #define COMMAND_REPEAT "repeat"
#define COMMAND_RANDOM "random" #define COMMAND_RANDOM "random"
#define COMMAND_STATS "stats" #define COMMAND_STATS "stats"
#define COMMAND_CLEAR_ERROR "clearerror" #define COMMAND_CLEAR_ERROR "clearerror"
#define COMMAND_LIST "list" #define COMMAND_LIST "list"
#define COMMAND_MOVE "move" #define COMMAND_MOVE "move"
#define COMMAND_SWAP "swap" #define COMMAND_SWAP "swap"
#define COMMAND_SEEK "seek" #define COMMAND_SEEK "seek"
#define COMMAND_STATUS_VOLUME "volume" #define COMMAND_STATUS_VOLUME "volume"
#define COMMAND_STATUS_STATE "state" #define COMMAND_STATUS_STATE "state"
#define COMMAND_STATUS_REPEAT "repeat" #define COMMAND_STATUS_REPEAT "repeat"
#define COMMAND_STATUS_RANDOM "random" #define COMMAND_STATUS_RANDOM "random"
#define COMMAND_STATUS_PLAYLIST "playlist" #define COMMAND_STATUS_PLAYLIST "playlist"
#define COMMAND_STATUS_PLAYLIST_LENGTH "playlistlength" #define COMMAND_STATUS_PLAYLIST_LENGTH "playlistlength"
#define COMMAND_STATUS_SONG "song" #define COMMAND_STATUS_SONG "song"
#define COMMAND_STATUS_TIME "time" #define COMMAND_STATUS_TIME "time"
#define COMMAND_STATUS_ERROR "error" #define COMMAND_STATUS_BITRATE "bitrate"
#define COMMAND_STATUS_ERROR "error"
/* if min: -1 don't check args *
* if max: -1 no max args */
typedef struct _CommandEntry {
char * cmd;
int min;
int max;
int (*handler)(FILE * fp, int argArrayLength, char ** argArray);
} CommandEntry;
int handlePlay(FILE * fp, int argArrayLength, char ** argArray) {
int song = -1;
char * test;
if(argArrayLength==2) {
song = strtol(argArray[1],&test,10);
if(*test!='\0') {
myfprintf(fp,"%s need a positive integer\n",COMMAND_RESPOND_ERROR);
return -1;
}
}
return playPlaylist(fp,song,1);
}
int handleStop(FILE * fp, int argArrayLength, char ** argArray) {
return stopPlaylist(fp);
}
int handlePause(FILE * fp, int argArrayLength, char ** argArray) {
return playerPause(fp);
}
int commandStatus(FILE * fp,int argArrayLength, char ** argArray) { int commandStatus(FILE * fp,int argArrayLength, char ** argArray) {
char * state = NULL; char * state = NULL;
if(argArrayLength!=1) {
myfprintf(fp,"%s Wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); playPlaylistIfPlayerStopped();
return -1; switch(getPlayerState()) {
} case PLAYER_STATE_STOP:
state = strdup(COMMAND_STOP);
playPlaylistIfPlayerStopped(); break;
switch(getPlayerState()) { case PLAYER_STATE_PAUSE:
case PLAYER_STATE_STOP: state = strdup(COMMAND_PAUSE);
state = strdup(COMMAND_STOP); break;
break; case PLAYER_STATE_PLAY:
case PLAYER_STATE_PAUSE: state = strdup(COMMAND_PLAY);
state = strdup(COMMAND_PAUSE); break;
break; }
case PLAYER_STATE_PLAY:
state = strdup(COMMAND_PLAY); myfprintf(fp,"%s: %i\n",COMMAND_STATUS_VOLUME,getVolumeLevel());
break; myfprintf(fp,"%s: %i\n",COMMAND_STATUS_REPEAT,getPlaylistRepeatStatus());
} myfprintf(fp,"%s: %i\n",COMMAND_STATUS_RANDOM,getPlaylistRandomStatus());
myfprintf(fp,"%s: %li\n",COMMAND_STATUS_PLAYLIST,getPlaylistVersion());
myfprintf(fp,"%s: %i\n",COMMAND_STATUS_VOLUME,getVolumeLevel()); myfprintf(fp,"%s: %i\n",COMMAND_STATUS_PLAYLIST_LENGTH,getPlaylistLength());
myfprintf(fp,"%s: %i\n",COMMAND_STATUS_REPEAT,getPlaylistRepeatStatus()); myfprintf(fp,"%s: %s\n",COMMAND_STATUS_STATE,state);
myfprintf(fp,"%s: %i\n",COMMAND_STATUS_RANDOM,getPlaylistRandomStatus());
myfprintf(fp,"%s: %li\n",COMMAND_STATUS_PLAYLIST,getPlaylistVersion()); if(getPlayerState()!=PLAYER_STATE_STOP) {
myfprintf(fp,"%s: %i\n",COMMAND_STATUS_PLAYLIST_LENGTH,getPlaylistLength()); myfprintf(fp,"%s: %i\n",COMMAND_STATUS_SONG,getPlaylistCurrentSong());
myfprintf(fp,"%s: %s\n",COMMAND_STATUS_STATE,state); myfprintf(fp,"%s: %i:%i\n",COMMAND_STATUS_TIME,getPlayerElapsedTime(),getPlayerTotalTime());
myfprintf(fp,"%s: %li\n",COMMAND_STATUS_BITRATE,getPlayerBitRate(),getPlayerTotalTime());
if(getPlayerState()!=PLAYER_STATE_STOP) { }
myfprintf(fp,"%s: %i\n",COMMAND_STATUS_SONG,getPlaylistCurrentSong());
myfprintf(fp,"%s: %i:%i\n",COMMAND_STATUS_TIME,getPlayerElapsedTime(),getPlayerTotalTime()); if(getPlayerError()!=PLAYER_ERROR_NOERROR) {
} myfprintf(fp,"%s: %s\n",COMMAND_STATUS_ERROR,getPlayerErrorStr());
}
if(getPlayerError()!=PLAYER_ERROR_NOERROR) {
myfprintf(fp,"%s: %s\n",COMMAND_STATUS_ERROR,getPlayerErrorStr()); free(state);
}
return 0;
free(state);
return 0;
} }
int processCommand(FILE * fp, int argArrayLength, char ** argArray) { int handleKill(FILE * fp, int argArrayLength, char ** argArray) {
if(argArrayLength==0) { return COMMAND_RETURN_KILL;
return 0; }
}
int handleClose(FILE * fp, int argArrayLength, char ** argArray) {
if(0==strcmp(argArray[0],COMMAND_PLAY)) { return COMMAND_RETURN_CLOSE;
int song = -1; }
char * test;
if(argArrayLength>2) { int handleAdd(FILE * fp, int argArrayLength, char ** argArray) {
myfprintf(fp,"%s too many arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); return addToPlaylist(fp,argArray[1]);
return -1; }
}
if(argArrayLength==2) { int handleDelete(FILE * fp, int argArrayLength, char ** argArray) {
song = strtol(argArray[1],&test,10); int song;
if(*test!='\0') { char * test;
myfprintf(fp,"%s need a positive integer\n",COMMAND_RESPOND_ERROR);
return -1; song = strtol(argArray[1],&test,10);
} if(*test!='\0') {
} myfprintf(fp,"%s need a positive integer\n",COMMAND_RESPOND_ERROR);
return playPlaylist(fp,song,1); return -1;
} }
else if(0==strcmp(argArray[0],COMMAND_STOP)) { return deleteFromPlaylist(fp,song);
if(argArrayLength!=1) { }
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1; int handlePlaylist(FILE * fp, int argArrayLength, char ** argArray) {
} return showPlaylist(fp);
return stopPlaylist(fp); }
}
else if(0==strcmp(argArray[0],COMMAND_PAUSE)) { int handleShuffle(FILE * fp, int argArrayLength, char ** argArray) {
if(argArrayLength!=1) { return shufflePlaylist(fp);
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); }
return -1;
} int handleClear(FILE * fp, int argArrayLength, char ** argArray) {
return playerPause(fp); return clearPlaylist(fp);
} }
else if(0==strcmp(argArray[0],COMMAND_STATUS)) {
return commandStatus(fp,argArrayLength,argArray); int handleSave(FILE * fp, int argArrayLength, char ** argArray) {
} return savePlaylist(fp,argArray[1]);
else if(0==strcmp(argArray[0],COMMAND_KILL)) { }
return COMMAND_RETURN_KILL;
} int handleLoad(FILE * fp, int argArrayLength, char ** argArray) {
else if(0==strcmp(argArray[0],COMMAND_CLOSE)) { return loadPlaylist(fp,argArray[1]);
return COMMAND_RETURN_CLOSE; }
}
else if(0==strcmp(argArray[0],COMMAND_ADD)) { int handleLs(FILE * fp, int argArrayLength, char ** argArray) {
if(argArrayLength!=2) { if(argArrayLength==1) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); if(ls(fp,NULL)<0) return -1;
return -1; else return lsPlaylists(fp,"");
} }
return addToPlaylist(fp,argArray[1]); else {
} if(ls(fp,argArray[1])<0) return -1;
else if(0==strcmp(argArray[0],COMMAND_SAVE)) { else return lsPlaylists(fp,argArray[1]);
if(argArrayLength!=2) { }
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); }
return -1;
} int handleLsInfo(FILE * fp, int argArrayLength, char ** argArray) {
return savePlaylist(fp,argArray[1]); if(argArrayLength==1) {
} if(printDirectoryInfo(fp,NULL)<0) return -1;
else if(0==strcmp(argArray[0],COMMAND_RM)) { else return lsPlaylists(fp,"");
if(argArrayLength!=2) { }
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); else {
return -1; if(printDirectoryInfo(fp,argArray[1])<0) return -1;
} else return lsPlaylists(fp,argArray[1]);
return deletePlaylist(fp,argArray[1]); }
} }
else if(0==strcmp(argArray[0],COMMAND_DELETE)) {
int song; int handleRm(FILE * fp, int argArrayLength, char ** argArray) {
char * test; return deletePlaylist(fp,argArray[1]);
if(argArrayLength!=2) { }
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1; int handlePlaylistInfo(FILE * fp, int argArrayLength, char ** argArray) {
} int song = -1;
song = strtol(argArray[1],&test,10); char * test;
if(*test!='\0') {
myfprintf(fp,"%s need a positive integer\n",COMMAND_RESPOND_ERROR); if(argArrayLength == 2) {
return -1;
}
return deleteFromPlaylist(fp,song);
}
else if(0==strcmp(argArray[0],COMMAND_MOVE)) {
int from;
int to;
char * test;
if(argArrayLength!=3) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1;
}
from = strtol(argArray[1],&test,10);
if(*test!='\0') {
myfprintf(fp,"%s \"%s\" is not a integer\n",
COMMAND_RESPOND_ERROR,argArray[1]);
return -1;
}
to = strtol(argArray[2],&test,10);
if(*test!='\0') {
myfprintf(fp,"%s \"%s\" is not a integer\n",
COMMAND_RESPOND_ERROR,argArray[2]);
return -1;
}
return moveSongInPlaylist(fp,from,to);
}
else if(0==strcmp(argArray[0],COMMAND_SWAP)) {
int song1;
int song2;
char * test;
if(argArrayLength!=3) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1;
}
song1 = strtol(argArray[1],&test,10);
if(*test!='\0') {
myfprintf(fp,"%s \"%s\" is not a integer\n",
COMMAND_RESPOND_ERROR,argArray[1]);
return -1;
}
song2 = strtol(argArray[2],&test,10);
if(*test!='\0') {
myfprintf(fp,"%s \"%s\" is not a integer\n",
COMMAND_RESPOND_ERROR,argArray[2]);
return -1;
}
return swapSongsInPlaylist(fp,song1,song2);
}
else if(0==strcmp(argArray[0],COMMAND_SEEK)) {
int song;
int time;
char * test;
if(argArrayLength!=3) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1;
}
song = strtol(argArray[1],&test,10); song = strtol(argArray[1],&test,10);
if(*test!='\0') { if(*test!='\0') {
myfprintf(fp,"%s \"%s\" is not a integer\n", myfprintf(fp,"%s need a positive integer\n",COMMAND_RESPOND_ERROR);
COMMAND_RESPOND_ERROR,argArray[1]); return -1;
return -1; }
} }
time = strtol(argArray[2],&test,10); return playlistInfo(fp,song);
if(*test!='\0') { }
myfprintf(fp,"%s \"%s\" is not a integer\n",
COMMAND_RESPOND_ERROR,argArray[2]); int handleFind(FILE * fp, int argArrayLength, char ** argArray) {
return -1; return findAndPrintSongsInTable(fp,argArray[1],argArray[2]);
} }
return seekSongInPlaylist(fp,song,time);
} int handleSearch(FILE * fp, int argArrayLength, char ** argArray) {
else if(0==strcmp(argArray[0],COMMAND_VOLUME)) { return searchForSongsInTable(fp,argArray[1],argArray[2]);
int change; }
char * test;
if(argArrayLength!=2) { int handleUpdate(FILE * fp, int argArrayLength, char ** argArray) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); return updateMp3Directory(fp);
return -1; }
}
change = strtol(argArray[1],&test,10); int handleNext(FILE * fp, int argArrayLength, char ** argArray) {
if(*test!='\0') { return nextSongInPlaylist(fp);
myfprintf(fp,"%s need a integer\n",COMMAND_RESPOND_ERROR); }
return -1;
} int handlePrevious(FILE * fp, int argArrayLength, char ** argArray) {
return changeVolumeLevel(fp,change); return previousSongInPlaylist(fp);
} }
else if(0==strcmp(argArray[0],COMMAND_REPEAT)) {
int status; int handleListAll(FILE * fp, int argArrayLength, char ** argArray) {
char * test; char * directory = NULL;
if(argArrayLength!=2) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); if(argArrayLength==2) directory = argArray[1];
return -1; return printAllIn(fp,directory);
} }
status = strtol(argArray[1],&test,10);
if(*test!='\0') { int handleVolume(FILE * fp, int argArrayLength, char ** argArray) {
myfprintf(fp,"%s need a integer\n",COMMAND_RESPOND_ERROR); int change;
return -1; char * test;
}
return setPlaylistRepeatStatus(fp,status); change = strtol(argArray[1],&test,10);
} if(*test!='\0') {
else if(0==strcmp(argArray[0],COMMAND_RANDOM)) { myfprintf(fp,"%s need an integer\n",COMMAND_RESPOND_ERROR);
int status; return -1;
char * test; }
if(argArrayLength!=2) { return changeVolumeLevel(fp,change);
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); }
return -1;
} int handleRepeat(FILE * fp, int argArrayLength, char ** argArray) {
status = strtol(argArray[1],&test,10); int status;
if(*test!='\0') { char * test;
myfprintf(fp,"%s need a integer\n",COMMAND_RESPOND_ERROR);
return -1; status = strtol(argArray[1],&test,10);
} if(*test!='\0') {
return setPlaylistRandomStatus(fp,status); myfprintf(fp,"%s need an integer\n",COMMAND_RESPOND_ERROR);
} return -1;
else if(0==strcmp(argArray[0],COMMAND_PLAYLISTINFO)) { }
int song = -1; return setPlaylistRepeatStatus(fp,status);
char * test; }
if(argArrayLength>2) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); int handleRandom(FILE * fp, int argArrayLength, char ** argArray) {
return -1; int status;
} char * test;
if(argArrayLength==2) {
song = strtol(argArray[1],&test,10); status = strtol(argArray[1],&test,10);
if(*test!='\0') { if(*test!='\0') {
myfprintf(fp,"%s need a positive integer\n",COMMAND_RESPOND_ERROR); myfprintf(fp,"%s need an integer\n",COMMAND_RESPOND_ERROR);
return -1; return -1;
} }
} return setPlaylistRandomStatus(fp,status);
return playlistInfo(fp,song); }
}
else if(0==strcmp(argArray[0],COMMAND_PLAYLIST)) { int handleStats(FILE * fp, int argArrayLength, char ** argArray) {
if(argArrayLength!=1) { return printStats(fp);
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); }
return -1;
} int handleClearError(FILE * fp, int argArrayLength, char ** argArray) {
return showPlaylist(fp);
} clearPlayerError();
else if(0==strcmp(argArray[0],COMMAND_SHUFFLE)) { return 0;
if(argArrayLength!=1) { }
myfprintf(fp,"%s too many arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1; int handleList(FILE * fp, int argArrayLength, char ** argArray) {
} char * arg1 = NULL;
return shufflePlaylist(fp);
} if(argArrayLength==3) arg1 = argArray[2];
else if(0==strcmp(argArray[0],COMMAND_CLEAR)) { return printAllKeysOfTable(fp,argArray[1],arg1);
if(argArrayLength!=1) { }
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1; int handleMove(FILE * fp, int argArrayLength, char ** argArray) {
} int from;
return clearPlaylist(fp); int to;
} char * test;
else if(0==strcmp(argArray[0],COMMAND_LOAD)) {
if(argArrayLength!=2) { from = strtol(argArray[1],&test,10);
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); if(*test!='\0') {
return -1; myfprintf(fp,"%s \"%s\" is not a integer\n",
} COMMAND_RESPOND_ERROR,argArray[1]);
return loadPlaylist(fp,argArray[1]); return -1;
} }
else if(0==strcmp(argArray[0],COMMAND_LS)) { to = strtol(argArray[2],&test,10);
if(argArrayLength>2) { if(*test!='\0') {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); myfprintf(fp,"%s \"%s\" is not a integer\n",
return -1; COMMAND_RESPOND_ERROR,argArray[2]);
} return -1;
if(argArrayLength==1) { }
if(ls(fp,NULL)<0) return -1; return moveSongInPlaylist(fp,from,to);
else return lsPlaylists(fp,""); }
}
else { int handleSwap(FILE * fp, int argArrayLength, char ** argArray) {
if(ls(fp,argArray[1])<0) return -1; int song1;
else return lsPlaylists(fp,argArray[1]); int song2;
} char * test;
}
else if(0==strcmp(argArray[0],COMMAND_LSINFO)) { song1 = strtol(argArray[1],&test,10);
if(argArrayLength>2) { if(*test!='\0') {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); myfprintf(fp,"%s \"%s\" is not a integer\n",
return -1; COMMAND_RESPOND_ERROR,argArray[1]);
} return -1;
if(argArrayLength==1) { }
if(printDirectoryInfo(fp,NULL)<0) return -1; song2 = strtol(argArray[2],&test,10);
else return lsPlaylists(fp,""); if(*test!='\0') {
} myfprintf(fp,"%s \"%s\" is not a integer\n",
else { COMMAND_RESPOND_ERROR,argArray[2]);
if(printDirectoryInfo(fp,argArray[1])<0) return -1; return -1;
else return lsPlaylists(fp,argArray[1]); }
} return swapSongsInPlaylist(fp,song1,song2);
} }
else if(0==strcmp(argArray[0],COMMAND_FIND)) {
if(argArrayLength!=3) { int handleSeek(FILE * fp, int argArrayLength, char ** argArray) {
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); int song;
return -1; int time;
} char * test;
return findAndPrintSongsInTable(fp,argArray[1],argArray[2]);
} song = strtol(argArray[1],&test,10);
else if(0==strcmp(argArray[0],COMMAND_SEARCH)) { if(*test!='\0') {
if(argArrayLength!=3) { myfprintf(fp,"%s \"%s\" is not a integer\n",
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); COMMAND_RESPOND_ERROR,argArray[1]);
return -1; return -1;
} }
return searchForSongsInTable(fp,argArray[1],argArray[2]); time = strtol(argArray[2],&test,10);
} if(*test!='\0') {
else if(0==strcmp(argArray[0],COMMAND_UPDATE)) { myfprintf(fp,"%s \"%s\" is not a integer\n",
if(argArrayLength!=1) { COMMAND_RESPOND_ERROR,argArray[2]);
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); return -1;
return -1; }
} return seekSongInPlaylist(fp,song,time);
return updateMp3Directory(fp); }
}
else if(0==strcmp(argArray[0],COMMAND_NEXT)) { /* call string, handlerFunc *
if(argArrayLength!=1) { * int (*handler)(FILE * fp, int argArrayLength, char ** argArray); */
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); CommandEntry commandTable[] = {
return -1; {COMMAND_PLAY , 0, 1, handlePlay},
} {COMMAND_STOP , 0, 0, handleStop},
return nextSongInPlaylist(fp); {COMMAND_PAUSE , 0, 0, handlePause},
} {COMMAND_STATUS , 0, 0, commandStatus},
else if(0==strcmp(argArray[0],COMMAND_PREVIOUS)) { {COMMAND_KILL , -1, -1, handleKill},
if(argArrayLength!=1) { {COMMAND_CLOSE , -1, -1, handleClose},
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); {COMMAND_ADD , 1, 1, handleAdd},
return -1; {COMMAND_DELETE , 1, 1, handleDelete},
} {COMMAND_PLAYLIST , 0, 0, handlePlaylist},
return previousSongInPlaylist(fp); {COMMAND_SHUFFLE , 0, 0, handleShuffle},
} {COMMAND_CLEAR , 0, 0, handleClear},
else if(0==strcmp(argArray[0],COMMAND_LISTALL)) { {COMMAND_SAVE , 1, 1, handleSave},
char * directory = NULL; {COMMAND_LOAD , 1, 1, handleLoad},
if(argArrayLength>2) { {COMMAND_LS , 0, 1, handleLs},
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); {COMMAND_LSINFO , 0, 1, handleLsInfo},
return -1; {COMMAND_RM , 1, 1, handleRm},
} {COMMAND_PLAYLISTINFO, 0, 1, handlePlaylistInfo},
if(argArrayLength==2) directory = argArray[1]; {COMMAND_FIND , 2, 2, handleFind},
return printAllIn(fp,directory); {COMMAND_SEARCH , 2, 2, handleSearch},
} {COMMAND_UPDATE , 0, 0, handleUpdate},
else if(0==strcmp(argArray[0],COMMAND_LIST)) { {COMMAND_NEXT , 0, 0, handleNext},
char * arg1 = NULL; {COMMAND_PREVIOUS , 0, 0, handlePrevious},
if(argArrayLength>3 || argArrayLength<2) { {COMMAND_LISTALL , 0, 1, handleListAll},
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); {COMMAND_VOLUME , 1, 1, handleVolume},
return -1; {COMMAND_REPEAT , 1, 1, handleRepeat},
} {COMMAND_RANDOM , 1, 1, handleRandom},
if(argArrayLength==3) arg1 = argArray[2]; {COMMAND_STATS , 0, 0, handleStats},
return printAllKeysOfTable(fp,argArray[1],arg1); {COMMAND_CLEAR_ERROR , 0, 0, handleClearError},
} {COMMAND_LIST , 1, 2, handleList},
else if(0==strcmp(argArray[0],COMMAND_STATS)) { {COMMAND_MOVE , 2, 2, handleMove},
if(argArrayLength!=1) { {COMMAND_SWAP , 2, 2, handleSwap},
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); {COMMAND_SEEK , 2, 2, handleSeek}
return -1; };
}
return printStats(fp); const int nCommands = sizeof(commandTable) / sizeof(commandTable[0]);
}
else if(0==strcmp(argArray[0],COMMAND_CLEAR_ERROR)) { int checkArgc(int index, FILE *fp, int argc, char** argArray) {
if(argArrayLength!=1) { int min = commandTable[index].min + 1;
myfprintf(fp,"%s wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); int max = commandTable[index].max + 1;
return -1;
if (min == 0) return 0;
if (min == max && max != argc) {
myfprintf(fp,"%s Wrong number of arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1;
}
else if (argc < min) {
myfprintf(fp,"%s too few arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1;
}
else if (argc > max && max /* != 0 */) {
myfprintf(fp,"%s too many arguments for \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]);
return -1;
}
else return 0;
}
int processCommand(FILE * fp, int argArrayLength, char ** argArray) {
int i = 0;
if(argArrayLength == 0) return 0;
for (i = 0; i < nCommands; i++) {
if (0 == strcmp(argArray[0],commandTable[i].cmd)) {
if (checkArgc(i,fp,argArrayLength,argArray)) return -1;
return commandTable[i].handler(fp, argArrayLength,
argArray);
} }
clearPlayerError(); }
return 0;
} myfprintf(fp,"%s Unknown command \"%s\"\n",COMMAND_RESPOND_ERROR,
else { argArray[0]);
myfprintf(fp,"%s Unknown command \"%s\"\n",COMMAND_RESPOND_ERROR,argArray[0]); return -1;
return -1;
}
return 0;
} }
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "decode.h" #include "decode.h"
#include "player.h" #include "player.h"
#include "playerData.h"
#include "utils.h" #include "utils.h"
#include "audio.h" #include "audio.h"
...@@ -30,6 +31,9 @@ ...@@ -30,6 +31,9 @@
#ifdef HAVE_FLAC #ifdef HAVE_FLAC
#include "flac_decode.h" #include "flac_decode.h"
#endif #endif
#ifdef HAVE_AUDIOFILE
#include "audiofile_decode.h"
#endif
#include "path.h" #include "path.h"
#include "log.h" #include "log.h"
...@@ -98,6 +102,7 @@ int waitOnDecode(PlayerControl * pc, AudioFormat * af, DecoderControl * dc, ...@@ -98,6 +102,7 @@ int waitOnDecode(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
} }
pc->elapsedTime = 0; pc->elapsedTime = 0;
pc->bitRate = 0;
pc->totalTime = cb->totalTime; pc->totalTime = cb->totalTime;
return 0; return 0;
...@@ -125,6 +130,7 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc, ...@@ -125,6 +130,7 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
cb->begin = 0; cb->begin = 0;
dc->seek = 1; dc->seek = 1;
pc->elapsedTime = dc->seekWhere; pc->elapsedTime = dc->seekWhere;
pc->bitRate = 0;
while(decode_pid>0 && dc->seek) usleep(10); while(decode_pid>0 && dc->seek) usleep(10);
} }
} }
...@@ -182,6 +188,11 @@ int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af, ...@@ -182,6 +188,11 @@ int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af,
dc->error = flac_decode(cb,af,dc); dc->error = flac_decode(cb,af,dc);
break; break;
#endif #endif
#ifdef HAVE_AUDIOFILE
case DECODE_TYPE_AUDIOFILE:
dc->error = audiofile_decode(cb,af,dc);
break;
#endif
default: default:
dc->error = DECODE_ERROR_UNKTYPE; dc->error = DECODE_ERROR_UNKTYPE;
} }
...@@ -196,7 +207,7 @@ int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af, ...@@ -196,7 +207,7 @@ int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af,
dc->stop = 0; dc->stop = 0;
} }
else if(dc->seek) dc->start = 1; else if(dc->seek) dc->start = 1;
else usleep(10); else usleep(1000);
} }
exit(0); exit(0);
...@@ -279,6 +290,7 @@ void decode() { ...@@ -279,6 +290,7 @@ void decode() {
cb->begin!=cb->next) cb->begin!=cb->next)
{ {
pc->elapsedTime = cb->times[cb->begin]; pc->elapsedTime = cb->times[cb->begin];
pc->bitRate = cb->bitRate[cb->begin];
playAudio(cb->chunks[cb->begin], playAudio(cb->chunks[cb->begin],
cb->chunkSize[cb->begin]); cb->chunkSize[cb->begin]);
cb->begin++; cb->begin++;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#define DECODE_TYPE_MP3 0 #define DECODE_TYPE_MP3 0
#define DECODE_TYPE_OGG 1 #define DECODE_TYPE_OGG 1
#define DECODE_TYPE_FLAC 2 #define DECODE_TYPE_FLAC 2
#define DECODE_TYPE_AUDIOFILE 3
#define DECODE_STATE_STOP 0 #define DECODE_STATE_STOP 0
#define DECODE_STATE_DECODE 1 #define DECODE_STATE_DECODE 1
......
...@@ -526,31 +526,36 @@ void initMp3Directory() { ...@@ -526,31 +526,36 @@ void initMp3Directory() {
} }
Song * getSong(char * file) { Song * getSong(char * file) {
static char * c; void * song;
static char * shortname; Directory * directory;
static char dir[MAXPATHLEN]; char * shortname = NULL;
static char dup[MAXPATHLEN]; char * dir = NULL;
static Directory * directory; char * dup = strdup(file);
static void * song; char * c = strtok(dup,"/");
if(strlen(file)>MAXPATHLEN) return NULL;
dir[0] = '\0';
strcpy(dup,file);
c = strtok(dup,"/");
while(c) { while(c) {
shortname = c; shortname = c;
c = strtok(NULL,"/"); c = strtok(NULL,"/");
if(c) { }
strcat(dir,shortname);
strcat(dir,"/"); if(shortname!=dup) {
for(c = dup; c < shortname-1; c++) {
if(*c=='\0') *c = '/';
} }
dir = dup;
} }
if(!(directory = getSubDirectory(mp3rootDirectory,dir))) return NULL; if(!(directory = getSubDirectory(mp3rootDirectory,dir))) {
free(dup);
return NULL;
}
if(!findInList(directory->songs,shortname,&song)) return NULL; if(!findInList(directory->songs,shortname,&song)) {
free(dup);
return NULL;
}
free(dup);
return (Song *)song; return (Song *)song;
} }
......
...@@ -175,7 +175,7 @@ int flacSendChunk(FlacData * data) { ...@@ -175,7 +175,7 @@ int flacSendChunk(FlacData * data) {
while(data->cb->begin==data->cb->end && data->cb->wrap && while(data->cb->begin==data->cb->end && data->cb->wrap &&
!data->dc->stop && !data->dc->seek) !data->dc->stop && !data->dc->seek)
{ {
usleep(10); usleep(1000);
} }
if(data->dc->stop) return -1; if(data->dc->stop) return -1;
...@@ -184,6 +184,7 @@ int flacSendChunk(FlacData * data) { ...@@ -184,6 +184,7 @@ int flacSendChunk(FlacData * data) {
memcpy(data->cb->chunks[data->cb->end],data->chunk,CHUNK_SIZE); memcpy(data->cb->chunks[data->cb->end],data->chunk,CHUNK_SIZE);
data->cb->chunkSize[data->cb->end] = data->chunk_length; data->cb->chunkSize[data->cb->end] = data->chunk_length;
data->cb->times[data->cb->end] = data->time; data->cb->times[data->cb->end] = data->time;
data->cb->bitRate[data->cb->end] = 0;
data->cb->end++; data->cb->end++;
if(data->cb->end>=BUFFERED_CHUNKS) { if(data->cb->end>=BUFFERED_CHUNKS) {
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#define INTERFACE_MAX_BUFFER_LENGTH MAXPATHLEN+1024 #define INTERFACE_MAX_BUFFER_LENGTH MAXPATHLEN+1024
#define INTERFACE_LIST_MODE_BEGIN "command_list_begin" #define INTERFACE_LIST_MODE_BEGIN "command_list_begin"
#define INTERFACE_LIST_MODE_END "command_list_end" #define INTERFACE_LIST_MODE_END "command_list_end"
#define INTERFACE_MAX_OUT_BUFFER_LENGTH 4096
int interface_max_connections; int interface_max_connections;
int interface_timeout; int interface_timeout;
...@@ -65,12 +66,16 @@ typedef struct _Interface { ...@@ -65,12 +66,16 @@ typedef struct _Interface {
int expired; /* set whether this interface should be closed on next int expired; /* set whether this interface should be closed on next
check of old interfaces */ check of old interfaces */
int num; /* interface number */ int num; /* interface number */
char outBuffer[INTERFACE_MAX_OUT_BUFFER_LENGTH];
int outBuflen;
} Interface; } Interface;
Interface * interfaces = NULL; Interface * interfaces = NULL;
void flushInterfaceBuffer(Interface * interface); void flushInterfaceBuffer(Interface * interface);
void printInterfaceOutBuffer(Interface * interface);
void openInterface(Interface * interface, int fd) { void openInterface(Interface * interface, int fd) {
int flags; int flags;
...@@ -90,9 +95,12 @@ void openInterface(Interface * interface, int fd) { ...@@ -90,9 +95,12 @@ void openInterface(Interface * interface, int fd) {
interface->bufferList = NULL; interface->bufferList = NULL;
interface->expired = 0; interface->expired = 0;
interface->outputBufferSize = 0; interface->outputBufferSize = 0;
interface->outBuflen = 0;
unblockSignals(); unblockSignals();
myfprintf(interface->fp,"%s %s %s\n",COMMAND_RESPOND_OK,GREETING,VERSION); myfprintf(interface->fp,"%s %s %s\n",COMMAND_RESPOND_OK,GREETING,
VERSION);
printInterfaceOutBuffer(interface);
} }
void closeInterface(Interface * interface) { void closeInterface(Interface * interface) {
...@@ -205,6 +213,7 @@ int interfaceReadInput(Interface * interface) { ...@@ -205,6 +213,7 @@ int interfaceReadInput(Interface * interface) {
interface->expired) { interface->expired) {
closeInterface(interface); closeInterface(interface);
} }
printInterfaceOutBuffer(interface);
freeList(interface->commandList); freeList(interface->commandList);
interface->commandList = NULL; interface->commandList = NULL;
...@@ -246,6 +255,7 @@ int interfaceReadInput(Interface * interface) { ...@@ -246,6 +255,7 @@ int interfaceReadInput(Interface * interface) {
interface->expired) { interface->expired) {
closeInterface(interface); closeInterface(interface);
} }
printInterfaceOutBuffer(interface);
} }
} }
freeArgArray(argArray,argArrayLength); freeArgArray(argArray,argArrayLength);
...@@ -260,28 +270,30 @@ int interfaceReadInput(Interface * interface) { ...@@ -260,28 +270,30 @@ int interfaceReadInput(Interface * interface) {
return 1; return 1;
} }
void addInterfacesReadyToReadAndListenSocketToFdSet(fd_set * fds) { void addInterfacesReadyToReadAndListenSocketToFdSet(fd_set * fds, int * fdmax) {
int i; int i;
FD_ZERO(fds); FD_ZERO(fds);
FD_SET(listenSocket,fds); FD_SET(listenSocket,fds);
if(*fdmax<listenSocket) *fdmax = listenSocket;
for(i=0;i<interface_max_connections;i++) { for(i=0;i<interface_max_connections;i++) {
if(interfaces[i].open && !interfaces[i].expired && !interfaces[i].bufferList) { if(interfaces[i].open && !interfaces[i].expired && !interfaces[i].bufferList) {
FD_SET(interfaces[i].fd,fds); FD_SET(interfaces[i].fd,fds);
if(*fdmax<interfaces[i].fd) *fdmax = interfaces[i].fd;
} }
} }
} }
void addInterfacesForBufferFlushToFdSet(fd_set * fds) { void addInterfacesForBufferFlushToFdSet(fd_set * fds, int * fdmax) {
int i; int i;
FD_ZERO(fds); FD_ZERO(fds);
FD_SET(listenSocket,fds);
for(i=0;i<interface_max_connections;i++) { for(i=0;i<interface_max_connections;i++) {
if(interfaces[i].open && !interfaces[i].expired && interfaces[i].bufferList) { if(interfaces[i].open && !interfaces[i].expired && interfaces[i].bufferList) {
FD_SET(interfaces[i].fd,fds); FD_SET(interfaces[i].fd,fds);
if(*fdmax<interfaces[i].fd) *fdmax = interfaces[i].fd;
} }
} }
} }
...@@ -312,14 +324,15 @@ int doIOForInterfaces() { ...@@ -312,14 +324,15 @@ int doIOForInterfaces() {
struct timeval tv; struct timeval tv;
int i; int i;
int selret; int selret;
int fdmax = 0;
tv.tv_sec = 1; tv.tv_sec = 1;
tv.tv_usec = 0; tv.tv_usec = 0;
addInterfacesReadyToReadAndListenSocketToFdSet(&rfds); addInterfacesReadyToReadAndListenSocketToFdSet(&rfds,&fdmax);
addInterfacesForBufferFlushToFdSet(&wfds); addInterfacesForBufferFlushToFdSet(&wfds,&fdmax);
while((selret = select(FD_SETSIZE,&rfds,&wfds,NULL,&tv))) { while((selret = select(fdmax+1,&rfds,&wfds,NULL,&tv))) {
if(FD_ISSET(listenSocket,&rfds)) getConnections(listenSocket); if(FD_ISSET(listenSocket,&rfds)) getConnections(listenSocket);
if(selret<0 && errno==EINTR) break; if(selret<0 && errno==EINTR) break;
else if(selret<0) { else if(selret<0) {
...@@ -340,8 +353,9 @@ int doIOForInterfaces() { ...@@ -340,8 +353,9 @@ int doIOForInterfaces() {
} }
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 0; tv.tv_usec = 0;
addInterfacesReadyToReadAndListenSocketToFdSet(&rfds); fdmax = 0;
addInterfacesForBufferFlushToFdSet(&wfds); addInterfacesReadyToReadAndListenSocketToFdSet(&rfds,&fdmax);
addInterfacesForBufferFlushToFdSet(&wfds,&fdmax);
} }
return 1; return 1;
...@@ -474,9 +488,11 @@ void flushAllInterfaceBuffers() { ...@@ -474,9 +488,11 @@ void flushAllInterfaceBuffers() {
int interfacePrintWithFD(int fd,char * buffer) { int interfacePrintWithFD(int fd,char * buffer) {
int i; int i;
int ret; int buflen;
int copylen;
Interface * interface;
if(!strlen(buffer)) return -1; if(!(buflen = strlen(buffer))) return -1;
for(i=0;i<interface_max_connections;i++) { for(i=0;i<interface_max_connections;i++) {
if(interfaces[i].fd==fd) break; if(interfaces[i].fd==fd) break;
...@@ -485,50 +501,96 @@ int interfacePrintWithFD(int fd,char * buffer) { ...@@ -485,50 +501,96 @@ int interfacePrintWithFD(int fd,char * buffer) {
/* if fd isn't found or interfaces is going to be closed, do nothing */ /* if fd isn't found or interfaces is going to be closed, do nothing */
if(i==interface_max_connections || interfaces[i].expired) return -1; if(i==interface_max_connections || interfaces[i].expired) return -1;
if(interfaces[i].bufferList) { interface = interfaces+i;
interfaces[i].outputBufferSize+=sizeof(ListNode);
interfaces[i].outputBufferSize+=strlen(buffer)+1; while(buflen>0) {
if(interfaces[i].outputBufferSize>interface_max_output_buffer_size) { copylen = buflen>
INTERFACE_MAX_OUT_BUFFER_LENGTH-interface->outBuflen?
INTERFACE_MAX_OUT_BUFFER_LENGTH-interface->outBuflen:
buflen;
memcpy(interface->outBuffer+interface->outBuflen,buffer,
copylen);
buflen-=copylen;
interface->outBuflen+=copylen;
buffer+=copylen;
if(interface->outBuflen>=INTERFACE_MAX_OUT_BUFFER_LENGTH) {
printInterfaceOutBuffer(interface);
}
}
return 0;
}
void printInterfaceOutBuffer(Interface * interface) {
char * buffer;
int ret;
if(!interface->open || interface->expired || !interface->outBuflen) {
return;
}
if(interface->bufferList) {
interface->outputBufferSize+=sizeof(ListNode);
interface->outputBufferSize+=interface->outBuflen+1;
if(interface->outputBufferSize>
interface_max_output_buffer_size)
{
ERROR3("interface %i: output buffer size (%lli) is " ERROR3("interface %i: output buffer size (%lli) is "
"larger than the max (%lli)\n", "larger than the max (%lli)\n",
interfaces[i].num, interface->num,
interfaces[i].outputBufferSize, interface->outputBufferSize,
interface_max_output_buffer_size); interface_max_output_buffer_size);
/* cause interface to close */ /* cause interface to close */
freeList(interfaces[i].bufferList); freeList(interface->bufferList);
interfaces[i].bufferList = NULL; interface->bufferList = NULL;
interfaces[i].expired = 1; interface->expired = 1;
return 0;
} }
else { else {
insertInListWithoutKey(interfaces[i].bufferList,(void *)strdup(buffer)); buffer = malloc(interface->outBuflen+1);
flushInterfaceBuffer(&interfaces[i]); memcpy(buffer,interface->outBuffer,interface->outBuflen);
buffer[interface->outBuflen] = '\0';
insertInListWithoutKey(interface->bufferList,(void *)buffer);
flushInterfaceBuffer(interface);
} }
} }
else { else {
if((ret = write(fd,buffer,strlen(buffer)))<0) { if((ret = write(interface->fd,interface->outBuffer,
interface->outBuflen))<0)
{
if(errno==EAGAIN || errno==EINTR) { if(errno==EAGAIN || errno==EINTR) {
interfaces[i].bufferList = makeList(free); buffer = malloc(interface->outBuflen+1);
insertInListWithoutKey(interfaces[i].bufferList,(void *)strdup(buffer)); memcpy(buffer,interface->outBuffer,
interface->outBuflen);
buffer[interface->outBuflen] = '\0';
interface->bufferList = makeList(free);
insertInListWithoutKey(interface->bufferList,
(void *)buffer);
} }
else { else {
DEBUG1("interface %i: problems writing\n",i); DEBUG1("interface %i: problems writing\n",
interfaces[i].expired = 1; interface->num);
return 0; interface->expired = 1;
return;
} }
} }
else if(ret<strlen(buffer)) { else if(ret<interface->outBuflen) {
interfaces[i].bufferList = makeList(free); buffer = malloc(interface->outBuflen-ret+1);
insertInListWithoutKey(interfaces[i].bufferList,(void *)strdup(&buffer[ret])); memcpy(buffer,interface->outBuffer+ret,
interface->outBuflen-ret);
buffer[interface->outBuflen-ret] = '\0';
interface->bufferList = makeList(free);
insertInListWithoutKey(interface->bufferList,buffer);
} }
/* if we needed to create buffer, initialize bufferSize info */ /* if we needed to create buffer, initialize bufferSize info */
if(interfaces[i].bufferList) { if(interface->bufferList) {
DEBUG1("interface %i: buffer created\n",i); DEBUG1("interface %i: buffer created\n",interface->num);
interfaces[i].outputBufferSize = sizeof(List); interface->outputBufferSize = sizeof(List);
interfaces[i].outputBufferSize+=sizeof(ListNode); interface->outputBufferSize+=sizeof(ListNode);
interfaces[i].outputBufferSize+=strlen((char *)interfaces[i].bufferList->firstNode->data)+1; interface->outputBufferSize+=strlen(
(char *)interface->bufferList->
firstNode->data)+1;
} }
} }
return 0; interface->outBuflen = 0;
} }
...@@ -82,36 +82,40 @@ int lsPlaylists(FILE * fp, char * path) { ...@@ -82,36 +82,40 @@ int lsPlaylists(FILE * fp, char * path) {
DIR * dir; DIR * dir;
struct stat st; struct stat st;
struct dirent * ent; struct dirent * ent;
char * cLast;
char * cNext;
char * dup; char * dup;
char s[MAXPATHLEN+1]; char s[MAXPATHLEN+1];
List * list = NULL; List * list = NULL;
ListNode * node = NULL; ListNode * node = NULL;
char * actualPath = rpp2app(path); char * actualPath = rpp2app(path);
int actlen = strlen(actualPath)+1;
int maxlen = MAXPATHLEN-actlen;
int suflen = strlen(PLAYLIST_FILE_SUFFIX)+1;
int suff;
if(actlen>MAXPATHLEN-1) return 0;
if((dir = opendir(actualPath))==NULL) return 0; if((dir = opendir(actualPath))==NULL) return 0;
s[MAXPATHLEN] = '\0';
strcpy(s,actualPath);
strcat(s,"/");
while((ent = readdir(dir))) { while((ent = readdir(dir))) {
if(ent->d_name[0]=='.') continue; /* hide hidden stuff */ dup = ent->d_name;
snprintf(s,MAXPATHLEN,"%s/%s",actualPath,ent->d_name); if(dup[0]!='.' &&
if(stat(s,&st)==0) { (suff=strlen(dup)-suflen)>0 &&
if(S_ISREG(st.st_mode)) { dup[suff]=='.' &&
dup = strdup(ent->d_name); strcmp(dup+suff+1,PLAYLIST_FILE_SUFFIX)==0)
cNext = cLast = strtok(dup,"."); {
while((cNext = strtok(NULL,"."))) cLast = cNext; strncpy(s+actlen,ent->d_name,maxlen);
if(cLast && 0==strcmp(cLast, if(stat(s,&st)==0) {
PLAYLIST_FILE_SUFFIX)) if(S_ISREG(st.st_mode)) {
{
if(list==NULL) list = makeList(NULL); if(list==NULL) list = makeList(NULL);
memset(dup,0,strlen(ent->d_name)); dup = strdup(ent->d_name);
strncpy(dup,ent->d_name, dup[suff] = '\0';
strlen(ent->d_name)-
strlen(PLAYLIST_FILE_SUFFIX)-1);
//myfprintf(fp,"playlist: %s\n",dup);
insertInList(list,dup,NULL); insertInList(list,dup,NULL);
free(dup);
} }
free(dup);
} }
} }
} }
...@@ -151,6 +155,9 @@ time_t isMusic(char * file) { ...@@ -151,6 +155,9 @@ time_t isMusic(char * file) {
#ifdef HAVE_MAD #ifdef HAVE_MAD
if((ret = isMp3(file)>0)) return ret; if((ret = isMp3(file)>0)) return ret;
#endif #endif
#ifdef HAVE_AUDIOFILE
if((ret = isWave(file)>0)) return ret;
#endif
return ret; return ret;
} }
...@@ -184,6 +191,33 @@ time_t isPlaylist(char * file) { ...@@ -184,6 +191,33 @@ time_t isPlaylist(char * file) {
return 0; return 0;
} }
time_t isWave(char * file) {
struct stat st;
char * actualFile = file;
if(actualFile[0]!='/') actualFile = rmp2amp(file);
if(stat(actualFile,&st)==0) {
if(S_ISREG(st.st_mode)) {
char * dup;
char * cLast;
char * cNext;
int ret = 0;
dup = strdup(file);
cNext = cLast = strtok(dup,".");
while((cNext = strtok(NULL,"."))) cLast = cNext;
if(cLast && 0==strcasecmp(cLast,"wav")) {
ret = st.st_mtime;
}
free(dup);
return ret;
}
else return 0;
}
return 0;
}
time_t isFlac(char * file) { time_t isFlac(char * file) {
struct stat st; struct stat st;
char * actualFile = file; char * actualFile = file;
......
...@@ -32,6 +32,8 @@ time_t isOgg(char * file); ...@@ -32,6 +32,8 @@ time_t isOgg(char * file);
time_t isFlac(char * file); time_t isFlac(char * file);
time_t isWave(char * file);
time_t isMusic(char * file); time_t isMusic(char * file);
time_t isDir(char * name); time_t isDir(char * name);
......
...@@ -67,11 +67,12 @@ void usage(char * argv[]) { ...@@ -67,11 +67,12 @@ void usage(char * argv[]) {
SYSTEM_CONFIG_FILE_LOCATION); SYSTEM_CONFIG_FILE_LOCATION);
ERROR0("\n"); ERROR0("\n");
ERROR0("options:\n"); ERROR0("options:\n");
ERROR0(" --help this usage statement\n"); ERROR0(" --help this usage statement\n");
ERROR0(" --no-daemon don't detach from console\n"); ERROR0(" --no-daemon don't detach from console\n");
ERROR0(" --create-db (re)create database\n"); ERROR0(" --create-db force (re)creation database\n");
ERROR0(" --verbose verbose logging\n"); ERROR0(" --no-create-db don't create database\n");
ERROR0(" --version prints version information\n"); ERROR0(" --verbose verbose logging\n");
ERROR0(" --version prints version information\n");
} }
void version() { void version() {
...@@ -106,6 +107,10 @@ void parseOptions(int argc, char ** argv, Options * options) { ...@@ -106,6 +107,10 @@ void parseOptions(int argc, char ** argv, Options * options) {
options->createDB = 1; options->createDB = 1;
argcLeft--; argcLeft--;
} }
else if(strcmp(argv[i],"--no-create-db")==0) {
options->createDB = -1;
argcLeft--;
}
else if(strcmp(argv[i],"--verbose")==0) { else if(strcmp(argv[i],"--verbose")==0) {
logLevel = LOG_LEVEL_DEBUG; logLevel = LOG_LEVEL_DEBUG;
argcLeft--; argcLeft--;
...@@ -174,6 +179,18 @@ int main(int argc, char * argv[]) { ...@@ -174,6 +179,18 @@ int main(int argc, char * argv[]) {
FILE * out; FILE * out;
FILE * err; FILE * err;
Options options; Options options;
int i;
for(i=0;i<FD_SETSIZE;i++) {
switch(i) {
case STDIN_FILENO:
case STDOUT_FILENO:
case STDERR_FILENO:
break;
default:
close(i);
}
}
initConf(); initConf();
...@@ -309,6 +326,11 @@ int main(int argc, char * argv[]) { ...@@ -309,6 +326,11 @@ int main(int argc, char * argv[]) {
} }
else strncpy(directorydb,options.dbFile,MAXPATHLEN); else strncpy(directorydb,options.dbFile,MAXPATHLEN);
if(options.createDB || readDirectoryDB()<0) { if(options.createDB || readDirectoryDB()<0) {
if(options.createDB<0) {
ERROR0("can't open db file and using \"--no-create-db\""
" command line option\n");
exit(-1);
}
initMp3Directory(); initMp3Directory();
if(writeDirectoryDB()<0) { if(writeDirectoryDB()<0) {
ERROR0("problem opening db for reading or writing\n"); ERROR0("problem opening db for reading or writing\n");
...@@ -323,9 +345,12 @@ int main(int argc, char * argv[]) { ...@@ -323,9 +345,12 @@ int main(int argc, char * argv[]) {
initStats(); initStats();
initPlaylist(); initPlaylist();
close(STDIN_FILENO);
if(options.daemon) { if(options.daemon) {
int pid = fork(); int pid;
fflush(NULL);
pid = fork();
if(pid>0) _exit(0); if(pid>0) _exit(0);
else if(pid<0) { else if(pid<0) {
ERROR0("problems fork'ing for daemon!\n"); ERROR0("problems fork'ing for daemon!\n");
...@@ -337,6 +362,11 @@ int main(int argc, char * argv[]) { ...@@ -337,6 +362,11 @@ int main(int argc, char * argv[]) {
exit(-1); exit(-1);
} }
if(setsid()<0) {
ERROR0("problems setsid'ing\n");
exit(-1);
}
if(close(STDOUT_FILENO)) { if(close(STDOUT_FILENO)) {
fprintf(err,"problems closing stdout : %s\n", fprintf(err,"problems closing stdout : %s\n",
strerror(errno)); strerror(errno));
...@@ -362,13 +392,20 @@ int main(int argc, char * argv[]) { ...@@ -362,13 +392,20 @@ int main(int argc, char * argv[]) {
} }
myfprintfStdLogMode(out,err); myfprintfStdLogMode(out,err);
fflush(NULL);
pid = fork();
if(pid>0) _exit(0);
else if(pid<0) {
ERROR0("problems fork'ing for daemon!\n");
exit(-1);
}
} }
else { else {
fclose(out); fclose(out);
fclose(err); fclose(err);
} }
fclose(stdin);
/* lets redirect stdin to dev null as a work around for libao bug */ /* lets redirect stdin to dev null as a work around for libao bug */
{ {
int fd = open("/dev/null",O_RDONLY); int fd = open("/dev/null",O_RDONLY);
......
...@@ -118,6 +118,7 @@ typedef struct _mp3DecodeData { ...@@ -118,6 +118,7 @@ typedef struct _mp3DecodeData {
long maxFrames; long maxFrames;
long currentFrame; long currentFrame;
int flush; int flush;
unsigned long bitRate;
} mp3DecodeData; } mp3DecodeData;
void initMp3DecodeData(mp3DecodeData * data) { void initMp3DecodeData(mp3DecodeData * data) {
...@@ -325,6 +326,22 @@ void mp3DecodeDataFinalize(mp3DecodeData * data) { ...@@ -325,6 +326,22 @@ void mp3DecodeDataFinalize(mp3DecodeData * data) {
if(data->times) free(data->times); if(data->times) free(data->times);
} }
/* this is primarily used for getting total time for tags */
int getMp3TotalTime(char * file) {
mp3DecodeData data;
int ret;
while(!(data.fp = fopen(file,"r")) && errno==EINTR);
if(!data.fp) return -1;
initMp3DecodeData(&data);
if(decodeFirstFrame(&data)<0) ret = -1;
else ret = data.totalTime;
mp3DecodeDataFinalize(&data);
return ret;
}
int openMp3(char * file, mp3DecodeData * data) { int openMp3(char * file, mp3DecodeData * data) {
if((data->fp = fopen(file,"r"))<=0) { if((data->fp = fopen(file,"r"))<=0) {
ERROR1("problems opening \"%s\"\n",file); ERROR1("problems opening \"%s\"\n",file);
...@@ -341,7 +358,7 @@ int openMp3(char * file, mp3DecodeData * data) { ...@@ -341,7 +358,7 @@ int openMp3(char * file, mp3DecodeData * data) {
int mp3ChildSendData(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) { int mp3ChildSendData(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) {
while(cb->begin==cb->end && cb->wrap && !dc->stop && !dc->seek) while(cb->begin==cb->end && cb->wrap && !dc->stop && !dc->seek)
usleep(10); usleep(1000);
if(dc->stop) return -1; if(dc->stop) return -1;
/* just for now, so it doesn't hang */ /* just for now, so it doesn't hang */
if(dc->seek) return 0; if(dc->seek) return 0;
...@@ -349,6 +366,7 @@ int mp3ChildSendData(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) { ...@@ -349,6 +366,7 @@ int mp3ChildSendData(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) {
memcpy(cb->chunks[cb->end],data->outputBuffer,CHUNK_SIZE); memcpy(cb->chunks[cb->end],data->outputBuffer,CHUNK_SIZE);
cb->chunkSize[cb->end] = data->outputPtr-data->outputBuffer; cb->chunkSize[cb->end] = data->outputPtr-data->outputBuffer;
cb->bitRate[cb->end] = data->bitRate/1000;
cb->times[cb->end] = data->elapsedTime; cb->times[cb->end] = data->elapsedTime;
cb->end++; cb->end++;
...@@ -369,6 +387,7 @@ int mp3Read(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) { ...@@ -369,6 +387,7 @@ int mp3Read(mp3DecodeData * data, Buffer * cb, DecoderControl * dc) {
data->highestFrame<data->maxFrames) data->highestFrame<data->maxFrames)
{ {
mad_timer_add(&data->timer,(data->frame).header.duration); mad_timer_add(&data->timer,(data->frame).header.duration);
data->bitRate = (data->frame).header.bitrate;
data->frameOffset[data->currentFrame] = data->frameOffset[data->currentFrame] =
data->currentOffset; data->currentOffset;
if(data->stream.this_frame!=NULL) { if(data->stream.this_frame!=NULL) {
......
...@@ -19,8 +19,15 @@ ...@@ -19,8 +19,15 @@
#ifndef MP3_DECODE_H #ifndef MP3_DECODE_H
#define MP3_DECODE_H #define MP3_DECODE_H
#ifdef HAVE_MAD
#include "playerData.h" #include "playerData.h"
/* this is primarily used in tag.c */
int getMp3TotalTime(char * file);
int mp3_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc); int mp3_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc);
#endif #endif
#endif
...@@ -61,6 +61,8 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc) ...@@ -61,6 +61,8 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc)
int eof = 0; int eof = 0;
long ret; long ret;
char chunk[CHUNK_SIZE]; char chunk[CHUNK_SIZE];
long bitRate = 0;
long test;
while(!eof) { while(!eof) {
if(dc->seek) { if(dc->seek) {
...@@ -76,13 +78,17 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc) ...@@ -76,13 +78,17 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc)
while(cb->begin==cb->end && cb->wrap && while(cb->begin==cb->end && cb->wrap &&
!dc->stop && !dc->seek) !dc->stop && !dc->seek)
{ {
usleep(10); usleep(1000);
} }
if(dc->stop) break; if(dc->stop) break;
else if(dc->seek) continue; else if(dc->seek) continue;
memcpy(cb->chunks[cb->end],chunk,CHUNK_SIZE); memcpy(cb->chunks[cb->end],chunk,CHUNK_SIZE);
cb->chunkSize[cb->end] = ret; cb->chunkSize[cb->end] = ret;
cb->times[cb->end] = ov_time_tell(&vf); cb->times[cb->end] = ov_time_tell(&vf);
if((test = ov_bitrate_instant(&vf))>0) {
bitRate = test/1000;
}
cb->bitRate[cb->end] = bitRate;
cb->end++; cb->end++;
if(cb->end>=BUFFERED_CHUNKS) { if(cb->end>=BUFFERED_CHUNKS) {
cb->end = 0; cb->end = 0;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "directory.h" #include "directory.h"
#include "volume.h" #include "volume.h"
#include "playerData.h" #include "playerData.h"
#include "char_conv.h"
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -97,6 +98,7 @@ int playerInit() { ...@@ -97,6 +98,7 @@ int playerInit() {
closeMp3Directory(); closeMp3Directory();
closeTables(); closeTables();
finishVolume(); finishVolume();
closeCharSetConversion();
while(1) { while(1) {
if(pc->play) decode(); if(pc->play) decode();
...@@ -115,7 +117,7 @@ int playerInit() { ...@@ -115,7 +117,7 @@ int playerInit() {
pc->queueLockState = PLAYER_QUEUE_UNLOCKED; pc->queueLockState = PLAYER_QUEUE_UNLOCKED;
pc->unlockQueue = 0; pc->unlockQueue = 0;
} }
else usleep(10); else usleep(1000);
} }
exit(0); exit(0);
...@@ -155,6 +157,9 @@ int playerPlay(FILE * fp, char * file) { ...@@ -155,6 +157,9 @@ int playerPlay(FILE * fp, char * file) {
#ifdef HAVE_FLAC #ifdef HAVE_FLAC
else if(isFlac(file)) pc->decodeType = DECODE_TYPE_FLAC; else if(isFlac(file)) pc->decodeType = DECODE_TYPE_FLAC;
#endif #endif
#ifdef HAVE_AUDIOFILE
else if(isWave(file)) pc->decodeType = DECODE_TYPE_AUDIOFILE;
#endif
else { else {
strcpy(pc->erroredFile,pc->file); strcpy(pc->erroredFile,pc->file);
pc->error = PLAYER_ERROR_UNKTYPE; pc->error = PLAYER_ERROR_UNKTYPE;
...@@ -215,6 +220,10 @@ int getPlayerElapsedTime() { ...@@ -215,6 +220,10 @@ int getPlayerElapsedTime() {
return (int)(getPlayerData()->playerControl.elapsedTime+0.5); return (int)(getPlayerData()->playerControl.elapsedTime+0.5);
} }
unsigned long getPlayerBitRate() {
return getPlayerData()->playerControl.bitRate;
}
int getPlayerTotalTime() { int getPlayerTotalTime() {
return (int)(getPlayerData()->playerControl.totalTime+0.5); return (int)(getPlayerData()->playerControl.totalTime+0.5);
} }
...@@ -282,6 +291,9 @@ int queueSong(char * file) { ...@@ -282,6 +291,9 @@ int queueSong(char * file) {
#ifdef HAVE_FLAC #ifdef HAVE_FLAC
else if(isFlac(file)) pc->decodeType = DECODE_TYPE_FLAC; else if(isFlac(file)) pc->decodeType = DECODE_TYPE_FLAC;
#endif #endif
#ifdef HAVE_AUDIOFILE
else if(isWave(file)) pc->decodeType = DECODE_TYPE_AUDIOFILE;
#endif
else return -1; else return -1;
pc->queueState = PLAYER_QUEUE_FULL; pc->queueState = PLAYER_QUEUE_FULL;
return 0; return 0;
......
...@@ -54,6 +54,7 @@ typedef struct _PlayerControl { ...@@ -54,6 +54,7 @@ typedef struct _PlayerControl {
int state; int state;
int closeAudio; int closeAudio;
int error; int error;
unsigned long bitRate;
float totalTime; float totalTime;
float elapsedTime; float elapsedTime;
char file[MAXPATHLEN+1]; char file[MAXPATHLEN+1];
...@@ -84,6 +85,8 @@ int getPlayerTotalTime(); ...@@ -84,6 +85,8 @@ int getPlayerTotalTime();
int getPlayerElapsedTime(); int getPlayerElapsedTime();
unsigned long getPlayerBitRate();
int getPlayerState(); int getPlayerState();
void clearPlayerError(); void clearPlayerError();
......
...@@ -31,6 +31,7 @@ extern int buffered_before_play; ...@@ -31,6 +31,7 @@ extern int buffered_before_play;
typedef struct _Buffer { typedef struct _Buffer {
char chunks[BUFFERED_CHUNKS][CHUNK_SIZE]; char chunks[BUFFERED_CHUNKS][CHUNK_SIZE];
uint_16 chunkSize[BUFFERED_CHUNKS]; uint_16 chunkSize[BUFFERED_CHUNKS];
uint_16 bitRate[BUFFERED_CHUNKS];
float times[BUFFERED_CHUNKS]; float times[BUFFERED_CHUNKS];
int begin; int begin;
int end; int end;
......
...@@ -77,6 +77,7 @@ int playlist_max_length; ...@@ -77,6 +77,7 @@ int playlist_max_length;
int playlist_stopOnError; int playlist_stopOnError;
int playlist_errorCount = 0; int playlist_errorCount = 0;
int playlist_queueError; int playlist_queueError;
int playlist_noGoToNext = 0;
int playlist_saveAbsolutePaths; int playlist_saveAbsolutePaths;
...@@ -452,6 +453,10 @@ int addToPlaylist(FILE * fp, char * file) { ...@@ -452,6 +453,10 @@ int addToPlaylist(FILE * fp, char * file) {
return -1; return -1;
} }
return addSongToPlaylist(fp,song);
}
int addSongToPlaylist(FILE * fp, Song * song) {
if(playlist.length==playlist_max_length) { if(playlist.length==playlist_max_length) {
myfprintf(fp,"%s playlist is at the max size\n",COMMAND_RESPOND_ERROR); myfprintf(fp,"%s playlist is at the max size\n",COMMAND_RESPOND_ERROR);
return -1; return -1;
...@@ -592,6 +597,7 @@ int deleteFromPlaylist(FILE * fp, int song) { ...@@ -592,6 +597,7 @@ int deleteFromPlaylist(FILE * fp, int song) {
/*if(playlist.current>=playlist.length) return playerStop(fp); /*if(playlist.current>=playlist.length) return playerStop(fp);
else return playPlaylistOrderNumber(fp,playlist.current);*/ else return playPlaylistOrderNumber(fp,playlist.current);*/
playerStop(stderr); playerStop(stderr);
playlist_noGoToNext = 1;
} }
else if(playlist_state!=PLAYLIST_STATE_STOP && else if(playlist_state!=PLAYLIST_STATE_STOP &&
playlist.current>songOrder) { playlist.current>songOrder) {
...@@ -632,6 +638,7 @@ int stopPlaylist(FILE * fp) { ...@@ -632,6 +638,7 @@ int stopPlaylist(FILE * fp) {
playerCloseAudio(); playerCloseAudio();
playlist.queued = -1; playlist.queued = -1;
playlist_state = PLAYLIST_STATE_STOP; playlist_state = PLAYLIST_STATE_STOP;
playlist_noGoToNext = 0;
/*stats.playTime+=getPlayerElapsedTime();*/ /*stats.playTime+=getPlayerElapsedTime();*/
if(playlist.random) randomizeOrder(0,playlist.length-1); if(playlist.random) randomizeOrder(0,playlist.length-1);
return 0; return 0;
...@@ -643,6 +650,7 @@ int playPlaylistOrderNumber(FILE * fp, int orderNum) { ...@@ -643,6 +650,7 @@ int playPlaylistOrderNumber(FILE * fp, int orderNum) {
if(playerStop(fp)<0) return -1; if(playerStop(fp)<0) return -1;
playlist_state = PLAYLIST_STATE_PLAY; playlist_state = PLAYLIST_STATE_PLAY;
playlist_noGoToNext = 0;
playlist.queued = -1; playlist.queued = -1;
playlist_queueError = 0; playlist_queueError = 0;
playlist.current = orderNum; playlist.current = orderNum;
...@@ -700,25 +708,6 @@ int playPlaylist(FILE * fp, int song, int stopOnError) { ...@@ -700,25 +708,6 @@ int playPlaylist(FILE * fp, int song, int stopOnError) {
return playPlaylistOrderNumber(fp,i); return playPlaylistOrderNumber(fp,i);
} }
void playPlaylistIfPlayerStopped() {
if(getPlayerState()==PLAYER_STATE_STOP) {
int error = getPlayerError();
if(error==PLAYER_ERROR_NOERROR) playlist_errorCount = 0;
else playlist_errorCount++;
if(playlist_state==PLAYLIST_STATE_PLAY && (
(playlist_stopOnError &&
error!=PLAYER_ERROR_NOERROR) ||
error==PLAYER_ERROR_AUDIO ||
error==PLAYER_ERROR_SYSTEM ||
playlist_errorCount>=playlist.length)) {
stopPlaylist(stderr);
}
else nextSongInPlaylist(stderr);
}
}
void syncPlayerAndPlaylist() { void syncPlayerAndPlaylist() {
if(playlist_state!=PLAYLIST_STATE_PLAY) return; if(playlist_state!=PLAYLIST_STATE_PLAY) return;
...@@ -726,6 +715,19 @@ void syncPlayerAndPlaylist() { ...@@ -726,6 +715,19 @@ void syncPlayerAndPlaylist() {
else syncPlaylistWithQueue(!playlist_queueError); else syncPlaylistWithQueue(!playlist_queueError);
} }
int currentSongInPlaylist(FILE * fp) {
if(playlist_state!=PLAYLIST_STATE_PLAY) return 0;
playlist_stopOnError = 0;
if(playlist.current<playlist.length) {
return playPlaylistOrderNumber(fp,playlist.current);
}
else return stopPlaylist(fp);;
return 0;
}
int nextSongInPlaylist(FILE * fp) { int nextSongInPlaylist(FILE * fp) {
if(playlist_state!=PLAYLIST_STATE_PLAY) return 0; if(playlist_state!=PLAYLIST_STATE_PLAY) return 0;
...@@ -747,6 +749,26 @@ int nextSongInPlaylist(FILE * fp) { ...@@ -747,6 +749,26 @@ int nextSongInPlaylist(FILE * fp) {
return 0; return 0;
} }
void playPlaylistIfPlayerStopped() {
if(getPlayerState()==PLAYER_STATE_STOP) {
int error = getPlayerError();
if(error==PLAYER_ERROR_NOERROR) playlist_errorCount = 0;
else playlist_errorCount++;
if(playlist_state==PLAYLIST_STATE_PLAY && (
(playlist_stopOnError &&
error!=PLAYER_ERROR_NOERROR) ||
error==PLAYER_ERROR_AUDIO ||
error==PLAYER_ERROR_SYSTEM ||
playlist_errorCount>=playlist.length)) {
stopPlaylist(stderr);
}
else if(playlist_noGoToNext) currentSongInPlaylist(stderr);
else nextSongInPlaylist(stderr);
}
}
int getPlaylistRepeatStatus() { int getPlaylistRepeatStatus() {
return playlist.repeat; return playlist.repeat;
} }
...@@ -977,7 +999,6 @@ int shufflePlaylist(FILE * fp) { ...@@ -977,7 +999,6 @@ int shufflePlaylist(FILE * fp) {
} }
int deletePlaylist(FILE * fp, char * file) { int deletePlaylist(FILE * fp, char * file) {
struct stat st;
char * rfile = malloc(strlen(file)+strlen(".")+ char * rfile = malloc(strlen(file)+strlen(".")+
strlen(PLAYLIST_FILE_SUFFIX)+1); strlen(PLAYLIST_FILE_SUFFIX)+1);
char * actualFile; char * actualFile;
...@@ -994,17 +1015,7 @@ int deletePlaylist(FILE * fp, char * file) { ...@@ -994,17 +1015,7 @@ int deletePlaylist(FILE * fp, char * file) {
return -1; return -1;
} }
if(stat(file,&st)<0) { if(unlink(actualFile)<0) {
myfprintf(fp,"%s problems stat'ing\n",COMMAND_RESPOND_ERROR);
return -1;
}
if(!S_ISREG(st.st_mode)) {
myfprintf(fp,"%s not a file\n",COMMAND_RESPOND_ERROR);
return -1;
}
if(unlink(file)<0) {
myfprintf(fp,"%s problems deleting file\n",COMMAND_RESPOND_ERROR); myfprintf(fp,"%s problems deleting file\n",COMMAND_RESPOND_ERROR);
return -1; return -1;
} }
...@@ -1132,7 +1143,7 @@ int loadPlaylist(FILE * fp, char * file) { ...@@ -1132,7 +1143,7 @@ int loadPlaylist(FILE * fp, char * file) {
while(fclose(fileP) && errno==EINTR); while(fclose(fileP) && errno==EINTR);
if(erroredFile) { if(erroredFile) {
fprintf(fp,"%s can't add file \"%s\"\n",COMMAND_RESPOND_ERROR, myfprintf(fp,"%s can't add file \"%s\"\n",COMMAND_RESPOND_ERROR,
erroredFile); erroredFile);
free(erroredFile); free(erroredFile);
return -1; return -1;
......
...@@ -41,6 +41,8 @@ int clearPlaylist(FILE * fp); ...@@ -41,6 +41,8 @@ int clearPlaylist(FILE * fp);
int addToPlaylist(FILE * fp, char * file); int addToPlaylist(FILE * fp, char * file);
int addSongToPlaylist(FILE * fp, Song * song);
int showPlaylist(FILE * fp); int showPlaylist(FILE * fp);
int deleteFromPlaylist(FILE * fp, int song); int deleteFromPlaylist(FILE * fp, int song);
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#define SONG_ALBUM "Album: " #define SONG_ALBUM "Album: "
#define SONG_TRACK "Track: " #define SONG_TRACK "Track: "
#define SONG_TITLE "Title: " #define SONG_TITLE "Title: "
#define SONG_TIME "Time: "
#define SONG_MTIME "mtime: " #define SONG_MTIME "mtime: "
#include <stdlib.h> #include <stdlib.h>
...@@ -43,25 +44,28 @@ Song * newSong(char * file) { ...@@ -43,25 +44,28 @@ Song * newSong(char * file) {
song->file = strdup(file); song->file = strdup(file);
#ifdef HAVE_OGG #ifdef HAVE_OGG
if((song->mtime = isOgg(file))) { if((song->mtime = isOgg(file))) {
song->tag = oggCommentDup(file); song->tag = oggTagDup(file);
return song; return song;
} }
#endif #endif
#ifdef HAVE_FLAC #ifdef HAVE_FLAC
if((song->mtime = isFlac(file))) { if((song->mtime = isFlac(file))) {
if(!(song->tag = flacVorbisCommentDup(file))) { song->tag = flacTagDup(file);
song->tag = id3Dup(file);
}
return song; return song;
} }
#endif #endif
#ifdef HAVE_MAD #ifdef HAVE_MAD
if((song->mtime = isMp3(file))) { if((song->mtime = isMp3(file))) {
song->tag = id3Dup(file); song->tag = mp3TagDup(file);
return song;
}
#endif
#ifdef HAVE_AUDIOFILE
if((song->mtime = isWave(file))) {
song->tag = audiofileTagDup(file);
return song; return song;
} }
#endif #endif
return song; return song;
} }
...@@ -169,6 +173,10 @@ void readSongInfoIntoList(FILE * fp, SongList * list) { ...@@ -169,6 +173,10 @@ void readSongInfoIntoList(FILE * fp, SongList * list) {
if(!song->tag) song->tag = newMpdTag(); if(!song->tag) song->tag = newMpdTag();
song->tag->title = strdup(&(buffer[strlen(SONG_TITLE)])); song->tag->title = strdup(&(buffer[strlen(SONG_TITLE)]));
} }
else if(0==strncmp(SONG_TIME,buffer,strlen(SONG_TIME))) {
if(!song->tag) song->tag = newMpdTag();
song->tag->time = atoi(&(buffer[strlen(SONG_TIME)]));
}
else if(0==strncmp(SONG_MTIME,buffer,strlen(SONG_MTIME))) { else if(0==strncmp(SONG_MTIME,buffer,strlen(SONG_MTIME))) {
song->mtime = atoi(&(buffer[strlen(SONG_TITLE)])); song->mtime = atoi(&(buffer[strlen(SONG_TITLE)]));
} }
...@@ -189,21 +197,25 @@ int updateSongInfo(Song * song) { ...@@ -189,21 +197,25 @@ int updateSongInfo(Song * song) {
if(song->tag) freeMpdTag(song->tag); if(song->tag) freeMpdTag(song->tag);
#ifdef HAVE_MAD #ifdef HAVE_MAD
if((song->mtime = isMp3(song->file))) { if((song->mtime = isMp3(song->file))) {
song->tag = id3Dup(song->file); song->tag = mp3TagDup(song->file);
return 0; return 0;
} }
#endif #endif
#ifdef HAVE_OGG #ifdef HAVE_OGG
if((song->mtime = isOgg(song->file))) { if((song->mtime = isOgg(song->file))) {
song->tag = oggCommentDup(song->file); song->tag = oggTagDup(song->file);
return 0; return 0;
} }
#endif #endif
#ifdef HAVE_FLAC #ifdef HAVE_FLAC
if((song->mtime = isFlac(song->file))) { if((song->mtime = isFlac(song->file))) {
if(!(song->tag = flacVorbisCommentDup(song->file))) { song->tag = flacTagDup(song->file);
song->tag = id3Dup(song->file); return 0;
} }
#endif
#ifdef HAVE_AUDIOFILE
if((song->mtime = isWave(song->file))) {
song->tag = audiofileTagDup(song->file);
return 0; return 0;
} }
#endif #endif
......
...@@ -68,7 +68,7 @@ void closeTables() { ...@@ -68,7 +68,7 @@ void closeTables() {
void addSongToSomeAlbumTable(List * table, Song * song) { void addSongToSomeAlbumTable(List * table, Song * song) {
void * album; void * album;
if(!song->tag) return; if(!song->tag) return;
if(!song->tag->title || !strlen(song->tag->title)) return; if(!song->tag->album || !strlen(song->tag->album)) return;
if(findInList(table,song->tag->album,&album)) { if(findInList(table,song->tag->album,&album)) {
insertInList((SongList *)album,song->file,song); insertInList((SongList *)album,song->file,song);
} }
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
#include "path.h" #include "path.h"
#include "myfprintf.h" #include "myfprintf.h"
#include "sig_handlers.h" #include "sig_handlers.h"
#include "mp3_decode.h"
#include "audiofile_decode.h"
#include "char_conv.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -47,6 +50,7 @@ void printMpdTag(FILE * fp, MpdTag * tag) { ...@@ -47,6 +50,7 @@ void printMpdTag(FILE * fp, MpdTag * tag) {
if(tag->album) myfprintf(fp,"Album: %s\n",tag->album); if(tag->album) myfprintf(fp,"Album: %s\n",tag->album);
if(tag->track) myfprintf(fp,"Track: %s\n",tag->track); if(tag->track) myfprintf(fp,"Track: %s\n",tag->track);
if(tag->title) myfprintf(fp,"Title: %s\n",tag->title); if(tag->title) myfprintf(fp,"Title: %s\n",tag->title);
if(tag->time>=0) myfprintf(fp,"Time: %i\n",tag->time);
} }
#ifdef HAVE_ID3TAG #ifdef HAVE_ID3TAG
...@@ -121,19 +125,45 @@ MpdTag * id3Dup(char * filename) { ...@@ -121,19 +125,45 @@ MpdTag * id3Dup(char * filename) {
id3_file_close(file); id3_file_close(file);
if(ret) {
if(!ret->artist) ret->artist = strdup("");
if(!ret->album) ret->album = strdup("");
if(!ret->title) ret->title = strdup("");
if(!ret->track) ret->track = strdup("");
}
unblockSignals(); unblockSignals();
#endif #endif
return ret; return ret;
} }
#ifdef HAVE_AUDIOFILE
MpdTag * audiofileTagDup(char * file) {
MpdTag * ret = NULL;
int time = getAudiofileTotalTime(rmp2amp(file));
if (time>=0) {
if(!ret) ret = newMpdTag();
ret->time = time;
}
return ret;
}
#endif
#ifdef HAVE_MAD
MpdTag * mp3TagDup(char * file) {
MpdTag * ret = NULL;
int time;
ret = id3Dup(file);
time = getMp3TotalTime(rmp2amp(file));
if(time>=0) {
if(!ret) ret = newMpdTag();
ret->time = time;
}
return ret;
}
#endif
#ifdef HAVE_OGG #ifdef HAVE_OGG
MpdTag * oggCommentDup(char * file) { MpdTag * oggTagDup(char * file) {
MpdTag * ret = NULL; MpdTag * ret = NULL;
FILE * fp; FILE * fp;
OggVorbis_File vf; OggVorbis_File vf;
...@@ -142,6 +172,8 @@ MpdTag * oggCommentDup(char * file) { ...@@ -142,6 +172,8 @@ MpdTag * oggCommentDup(char * file) {
char * s1; char * s1;
char * s2; char * s2;
setCharSetConversion("LATIN1","UTF-8");
while(!(fp = fopen(rmp2amp(file),"r")) && errno==EINTR); while(!(fp = fopen(rmp2amp(file),"r")) && errno==EINTR);
if(!fp) return NULL; if(!fp) return NULL;
blockSignals(); blockSignals();
...@@ -151,6 +183,9 @@ MpdTag * oggCommentDup(char * file) { ...@@ -151,6 +183,9 @@ MpdTag * oggCommentDup(char * file) {
return NULL; return NULL;
} }
ret = newMpdTag();
ret->time = (int)(ov_time_total(&vf,-1)+0.5);
comments = ov_comment(&vf,-1)->user_comments; comments = ov_comment(&vf,-1)->user_comments;
while(*comments) { while(*comments) {
...@@ -158,20 +193,32 @@ MpdTag * oggCommentDup(char * file) { ...@@ -158,20 +193,32 @@ MpdTag * oggCommentDup(char * file) {
s1 = strtok(temp,"="); s1 = strtok(temp,"=");
s2 = strtok(NULL,"="); s2 = strtok(NULL,"=");
if(0==strcasecmp(s1,"artist")) { if(0==strcasecmp(s1,"artist")) {
if(!ret) ret = newMpdTag(); if(!ret->artist && s2) {
if(!ret->artist && s2) ret->artist = strdup(s2); if(!(ret->artist = convStrDup(s2))) {
ret->artist = strdup(s2);
}
}
} }
else if(0==strcasecmp(s1,"title")) { else if(0==strcasecmp(s1,"title")) {
if(!ret) ret = newMpdTag(); if(!ret->title && s2) {
if(!ret->title && s2) ret->title = strdup(s2); if(!(ret->title = convStrDup(s2))) {
ret->title = strdup(s2);
}
}
} }
else if(0==strcasecmp(s1,"album")) { else if(0==strcasecmp(s1,"album")) {
if(!ret) ret = newMpdTag(); if(!ret->album && s2) {
if(!ret->album && s2) ret->album = strdup(s2); if(!(ret->album = convStrDup(s2))) {
ret->album = strdup(s2);
}
}
} }
else if(0==strcasecmp(s1,"tracknumber")) { else if(0==strcasecmp(s1,"tracknumber")) {
if(!ret) ret = newMpdTag(); if(!ret->track && s2) {
if(!ret->track && s2) ret->track = strdup(s2); if(!(ret->track = convStrDup(s2))) {
ret->track = strdup(s2);
}
}
} }
free(temp); free(temp);
++comments; ++comments;
...@@ -179,27 +226,21 @@ MpdTag * oggCommentDup(char * file) { ...@@ -179,27 +226,21 @@ MpdTag * oggCommentDup(char * file) {
ov_clear(&vf); ov_clear(&vf);
if(ret) {
if(!ret->artist) ret->artist = strdup("");
if(!ret->album) ret->album = strdup("");
if(!ret->title) ret->title = strdup("");
if(!ret->track) ret->track = strdup("");
}
unblockSignals(); unblockSignals();
return ret; return ret;
} }
#endif #endif
#ifdef HAVE_FLAC #ifdef HAVE_FLAC
MpdTag * flacVorbisCommentDup(char * file) { MpdTag * flacMetadataDup(char * file, int * vorbisCommentFound) {
MpdTag * ret = NULL; MpdTag * ret = NULL;
FLAC__Metadata_SimpleIterator * it; FLAC__Metadata_SimpleIterator * it;
FLAC__StreamMetadata * block = NULL; FLAC__StreamMetadata * block = NULL;
int found = 0;
int offset; int offset;
int len, pos; int len, pos;
*vorbisCommentFound = 0;
blockSignals(); blockSignals();
it = FLAC__metadata_simple_iterator_new(); it = FLAC__metadata_simple_iterator_new();
if(!FLAC__metadata_simple_iterator_init(it,rmp2amp(file),1,0)) { if(!FLAC__metadata_simple_iterator_init(it,rmp2amp(file),1,0)) {
...@@ -209,69 +250,110 @@ MpdTag * flacVorbisCommentDup(char * file) { ...@@ -209,69 +250,110 @@ MpdTag * flacVorbisCommentDup(char * file) {
} }
do { do {
if(block) FLAC__metadata_object_delete(block);
block = FLAC__metadata_simple_iterator_get_block(it); block = FLAC__metadata_simple_iterator_get_block(it);
if(block->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) found=1; if(!block) break;
} while(!found && FLAC__metadata_simple_iterator_next(it)); if(block->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
char * dup;
if(found) {
offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"artist"); setCharSetConversion("LATIN1","UTF-8");
if(offset>=0) {
if(!ret) ret = newMpdTag(); offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"artist");
pos = strlen("artist="); if(offset>=0) {
len = block->data.vorbis_comment.comments[offset].length-pos; *vorbisCommentFound = 1;
if(len>0) { if(!ret) ret = newMpdTag();
ret->artist = malloc(len+1); pos = strlen("artist=");
memcpy(ret->artist,&(block->data.vorbis_comment.comments[offset].entry[pos]),len); len = block->data.vorbis_comment.comments[offset].length-pos;
ret->artist[len] = '\0'; if(len>0) {
dup = malloc(len+1);
memcpy(dup,&(block->data.vorbis_comment.comments[offset].entry[pos]),len);
dup[len] = '\0';
if((ret->artist = convStrDup(dup))) {
free(dup);
}
else ret->artist = dup;
}
} }
} offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"album");
offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"album"); if(offset>=0) {
if(offset>=0) { *vorbisCommentFound = 1;
if(!ret) ret = newMpdTag(); if(!ret) ret = newMpdTag();
pos = strlen("album="); pos = strlen("album=");
len = block->data.vorbis_comment.comments[offset].length-pos; len = block->data.vorbis_comment.comments[offset].length-pos;
if(len>0) { if(len>0) {
ret->album = malloc(len+1); dup = malloc(len+1);
memcpy(ret->album,&(block->data.vorbis_comment.comments[offset].entry[pos]),len); memcpy(dup,&(block->data.vorbis_comment.comments[offset].entry[pos]),len);
ret->album[len] = '\0'; dup[len] = '\0';
if((ret->album = convStrDup(dup))) {
free(dup);
}
else ret->album = dup;
}
} }
} offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"title");
offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"title"); if(offset>=0) {
if(offset>=0) { *vorbisCommentFound = 1;
if(!ret) ret = newMpdTag(); if(!ret) ret = newMpdTag();
pos = strlen("title="); pos = strlen("title=");
len = block->data.vorbis_comment.comments[offset].length-pos; len = block->data.vorbis_comment.comments[offset].length-pos;
if(len>0) { if(len>0) {
ret->title = malloc(len+1); dup = malloc(len+1);
memcpy(ret->title,&(block->data.vorbis_comment.comments[offset].entry[pos]),len); memcpy(dup,&(block->data.vorbis_comment.comments[offset].entry[pos]),len);
ret->title[len] = '\0'; dup[len] = '\0';
if((ret->title = convStrDup(dup))) {
free(dup);
}
else ret->title = dup;
}
} }
} offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"tracknumber");
offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block,0,"tracknumber"); if(offset>=0) {
if(offset>=0) { *vorbisCommentFound = 1;
if(!ret) ret = newMpdTag(); if(!ret) ret = newMpdTag();
pos = strlen("tracknumber="); pos = strlen("tracknumber=");
len = block->data.vorbis_comment.comments[offset].length-pos; len = block->data.vorbis_comment.comments[offset].length-pos;
if(len>0) { if(len>0) {
ret->track = malloc(len+1); dup = malloc(len+1);
memcpy(ret->track,&(block->data.vorbis_comment.comments[offset].entry[pos]),len); memcpy(dup,&(block->data.vorbis_comment.comments[offset].entry[pos]),len);
ret->track[len] = '\0'; dup[len] = '\0';
if((ret->track = convStrDup(dup))) {
free(dup);
}
else ret->track = dup;
}
} }
} }
if(ret) { else if(block->type == FLAC__METADATA_TYPE_STREAMINFO) {
if(!ret->artist) ret->artist = strdup(""); if(!ret) ret = newMpdTag();
if(!ret->album) ret->album = strdup(""); ret->time = ((float)block->data.stream_info.
if(!ret->title) ret->title = strdup(""); total_samples) /
if(!ret->track) ret->track = strdup(""); block->data.stream_info.sample_rate +
0.5;
} }
} FLAC__metadata_object_delete(block);
} while(FLAC__metadata_simple_iterator_next(it));
if(block) FLAC__metadata_object_delete(block);
FLAC__metadata_simple_iterator_delete(it); FLAC__metadata_simple_iterator_delete(it);
unblockSignals(); unblockSignals();
return ret; return ret;
} }
MpdTag * flacTagDup(char * file) {
MpdTag * ret = NULL;
int foundVorbisComment = 0;
ret = flacMetadataDup(file,&foundVorbisComment);
if(!ret) return NULL;
if(!foundVorbisComment) {
MpdTag * temp = id3Dup(file);
if(temp) {
temp->time = ret->time;
freeMpdTag(ret);
ret = temp;
}
}
return ret;
}
#endif #endif
MpdTag * newMpdTag() { MpdTag * newMpdTag() {
...@@ -280,6 +362,7 @@ MpdTag * newMpdTag() { ...@@ -280,6 +362,7 @@ MpdTag * newMpdTag() {
ret->artist = NULL; ret->artist = NULL;
ret->title = NULL; ret->title = NULL;
ret->track = NULL; ret->track = NULL;
ret->time = -1;
return ret; return ret;
} }
...@@ -300,6 +383,7 @@ MpdTag * mpdTagDup(MpdTag * tag) { ...@@ -300,6 +383,7 @@ MpdTag * mpdTagDup(MpdTag * tag) {
ret->album = strdup(tag->album); ret->album = strdup(tag->album);
ret->title = strdup(tag->title); ret->title = strdup(tag->title);
ret->track = strdup(tag->track); ret->track = strdup(tag->track);
ret->time = tag->time;
} }
return ret; return ret;
......
...@@ -26,17 +26,28 @@ typedef struct _MpdTag { ...@@ -26,17 +26,28 @@ typedef struct _MpdTag {
char * album; char * album;
char * track; char * track;
char * title; char * title;
int time;
} MpdTag; } MpdTag;
MpdTag * newMpdTag(); MpdTag * newMpdTag();
void freeMpdTag(MpdTag * tag); void freeMpdTag(MpdTag * tag);
MpdTag * id3Dup(char * file); #ifdef HAVE_MAD
MpdTag * mp3TagDup(char * file);
#endif
MpdTag * oggCommentDup(char * file); #ifdef HAVE_OGG
MpdTag * oggTagDup(char * file);
#endif
MpdTag * flacVorbisCommentDup(char * file); #ifdef HAVE_FLAC
MpdTag * flacTagDup(char * file);
#endif
#ifdef HAVE_AUDIOFILE
MpdTag * audiofileTagDup(char * file);
#endif
void printMpdTag(FILE * fp, MpdTag * tag); void printMpdTag(FILE * fp, MpdTag * tag);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment