Compare commits

..

19 Commits

Author SHA1 Message Date
Max Kellermann
8d290ad509 release v0.20.8 2017-05-19 20:10:22 +02:00
Max Kellermann
b90c48b50f .travis.yml: enable Mac OS X 2017-05-19 19:54:27 +02:00
Max Kellermann
d19e7db09e .travis.yml: add shell variable OPTIONS 2017-05-19 19:54:27 +02:00
Max Kellermann
9939904b02 .travis.yml: configure with --disable-silent-rules --disable-dependency-tracking 2017-05-19 19:54:27 +02:00
Max Kellermann
ca23b15f5c test/test_byte_reverse: move "alignas" attribute to the front
Apparently, this makes old clang versions happy ("'alignas' attribute
cannot be applied to types).
2017-05-19 19:45:42 +02:00
Mario Di Raimondo
ffa676f577 playlist/m3u: support for mime-type audio-mpegurl for M3U playlists 2017-05-19 15:25:58 +02:00
Max Kellermann
6d023c4df3 .travis.yml: remove the unnecessary "compiler" setting 2017-05-17 16:22:19 +02:00
Max Kellermann
b31bd37a30 .travis.yml: check $TRAVIS_OS_NAME
Prepare for Mac OS X support by omitting those Ubuntu-specific
commands.
2017-05-17 15:59:25 +02:00
Max Kellermann
78faee8c7c .travis.yml: choose compiler with environment variables
.. and not update-alternatives, which requires "sudo".
2017-05-17 15:56:19 +02:00
Max Kellermann
40e2a703d0 .travis.yml: parallel build 2017-05-17 15:36:59 +02:00
Max Kellermann
b01edcb9bc .travis.yml: indent 2 2017-05-17 15:27:40 +02:00
André Klitzing
f7fffc9be8 Add initial travis configuration 2017-05-16 07:37:46 +02:00
Max Kellermann
50e8634097 python/build/libs: upgrade FFmpeg to 3.3.1 2017-05-16 07:27:08 +02:00
Max Kellermann
e3994e517e INSTALL: merge into doc/user.xml 2017-05-16 07:24:02 +02:00
Max Kellermann
2bb7785189 doc/user.xml: add sticker documentation 2017-05-16 07:23:57 +02:00
Max Kellermann
90c8408111 doc/user.xml: add Zeroconf documentation 2017-05-16 07:23:52 +02:00
Max Kellermann
64786ec12a Main: omit "constexpr" on MIN_BUFFER_SIZE with GCC 4.x 2017-05-16 07:20:47 +02:00
Max Kellermann
b3c82f8886 output/{osx,haiku,pulse,sles}: add missing "noexcept"
Fixes build failure on OS X, closes #44.  With the other plugins,
that's not critical, because those use the AudioOutputWrapper, which
hides this problem.
2017-05-16 07:12:30 +02:00
Max Kellermann
063259dc52 increment version number to 0.20.8 2017-05-16 07:06:57 +02:00
15 changed files with 226 additions and 250 deletions

36
.travis.yml Normal file
View File

@@ -0,0 +1,36 @@
dist: trusty
language: cpp
addons:
apt:
packages:
- libcppunit-dev
- libboost-dev
os:
- linux
- osx
env:
global:
- MAKEFLAGS="-j2"
before_install:
# C++14
- test "$TRAVIS_OS_NAME" != "linux" || sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- test "$TRAVIS_OS_NAME" != "linux" || sudo apt-get update -qq
- test "$TRAVIS_OS_NAME" != "osx" || brew update
install:
# C++14
- test "$TRAVIS_OS_NAME" != "linux" || sudo apt-get install -qq g++-5
- test "$TRAVIS_OS_NAME" != "osx" || brew install cppunit
script:
- OPTIONS="--enable-test"
- test "$TRAVIS_OS_NAME" != "linux" || export CC=gcc-5 CXX=g++-5
- test "$TRAVIS_OS_NAME" != "osx" || OPTIONS="$OPTIONS --enable-osx"
- ./autogen.sh
- ./configure --disable-silent-rules --disable-dependency-tracking $OPTIONS
- make
- make check

206
INSTALL
View File

@@ -1,206 +0,0 @@
Music Player Daemon (MPD) - INSTALL
Introduction
------------
This document is a very small amount of documentation about what is needed to
install MPD. If more information is desired, read the user manual:
http://www.musicpd.org/doc/user/
Dependencies
------------
gcc 4.7 or later - http://gcc.gnu.org/
clang 3.2 or later - http://clang.llvm.org/
Any other C++11 compliant compiler should also work.
Boost 1.46 - http://www.boost.org/
Optional Output Dependencies
----------------------------
You will need at least one of these to compile MPD.
Most of these are available as packages on major distributions. Be sure to
install both the library package as well as the development package.
AO - http://www.xiph.org/ao/
A portable library that abstracts many audio output types as one API. Should
be used only if there is no native plugin available or if the native plugin
doesn't work. You will need libao.
ALSA - http://www.alsa-project.org/
The Advanced Linux Sound Architecture. Recommended audio output if you use
Linux. You will need libasound.
FIFO
This is a mostly undocumented, developer plugin to transmit raw data.
OSS - http://www.opensound.com
Open Sound System.
PulseAudio - http://www.pulseaudio.org/
An advanced sound daemon. You will need libpulse.
JACK - http://www.jackaudio.org/
A low-latency sound daemon.
libshout - http://www.icecast.org/
For streaming to an Icecast or Shoutcast server.
You also need an encoder: either libvorbisenc (ogg), or liblame (mp3).
OpenAL - http://kcat.strangesoft.net/openal.html
Open Audio Library
Optional Input Dependencies
---------------------------
You will need at least one of these to compile MPD.
Most of these are available as packages on major distributions. Be sure to
install both the library package as well as the development package.
MAD - http://www.underbit.com/products/mad/
For MP3 support. You will need libmad, and optionally libid3tag if you want
ID3 tag support.
libmpg123 - http://www.mpg123.de/
Alternative for MP3 support.
Ogg Vorbis - http://www.xiph.org/ogg/vorbis/
For Ogg Vorbis support. You will need libogg and libvorbis.
libopus - http://www.opus-codec.org/
Opus codec support
FLAC - http://flac.sourceforge.net/
For FLAC support. You will need version 1.2 or higher of libFLAC.
Audio File - http://www.68k.org/~michael/audiofile/
For WAVE, AIFF, and AU support. You will need libaudiofile.
FAAD2 - http://www.audiocoding.com/
For MP4/AAC support.
libmpcdec - http://www.musepack.net/
For Musepack support.
MikMod - http://mikmod.raphnet.net/
For MOD support. You will need libmikmod.
libavcodec, libavformat (ffmpeg or libav) - http://ffmpeg.mplayerhq.hu/ http://libav.org/
Multi-codec library.
libsidplay2 - http://sidplay2.sourceforge.net/
For C64 SID support.
libfluidsynth - http://fluidsynth.resonance.org/
For MIDI support.
libwildmidi 0.2.3 - http://wildmidi.sourceforge.net/
For MIDI support.
libsndfile - http://www.mega-nerd.com/libsndfile/
WAVE, AIFF, and many others.
libwavpack - http://www.wavpack.com/
For WavPack playback.
libadplug - http://adplug.sourceforge.net/
For AdLib playback.
Optional Miscellaneous Dependencies
-----------------------------------
Avahi - http://www.avahi.org/
For Zeroconf support.
libsamplerate - http://www.mega-nerd.com/SRC/
For advanced samplerate conversions.
libcurl - http://curl.haxx.se/
For playing HTTP streams.
libmms - https://launchpad.net/libmms
For playing MMS streams.
SQLite - http://www.sqlite.org/
For the sticker database.
libcdio - http://www.gnu.org/software/libcdio/
For playing audio CDs.
libsystemd-daemon - http://freedesktop.org/wiki/Software/systemd/
For systemd activation.
pkg-config
----------
MPD uses pkg-config to locate most external libraries. If you do not
have pkg-config, or if your version of the library does not ship the
".pc" file, you have to provide the library's build options in
environment variables. These variables are documented in "./configure
--help". Example:
FLAC_CFLAGS=-I/usr/include/FLAC FLAC_LIBS=-lFLAC ./configure
Download
--------
Get the latest release from of MPD from <http://www.musicpd.org/>.
Compile
-------
1) unpack the archive
$ tar xf mpd-x.x.x.tar.xz
2) change to directory created
$ cd mpd-x.x.x
3) Run configure script (this will determine what dependencies you have)
$ ./configure
4) Compile
$ make
Install (Optional)
-------
(as root)
$ make install
Run
---
1) run mpd:
$ mpd <config file>
First default is $XDG_CONFIG_HOME/mpd/mpd.conf then ~/.mpdconf then
~/.mpd/mpd.conf then /etc/mpd.conf. If neither of these exist a mpd
configuration file must be specified at runtime.
A sample config file is included with the source of MPD, mpdconf.example.
The first time MPD is run it will attempt to discover all music in your
music root, recursively. This can be affected by the symbolic link
options specified in the example mpd.conf.
Using MPD
---------
You can download many different interfaces for MPD at
http://www.musicpd.org/clients/

7
NEWS
View File

@@ -1,3 +1,10 @@
ver 0.20.8 (2017/05/19)
* output
- osx: fix build failure due to missing "noexcept"
* playlist
- m3u: support MIME type `audio/mpegurl`
* fix build failure with GCC 4.x
ver 0.20.7 (2017/05/15)
* database
- simple: fix false positive directory loop detection with NFS

View File

@@ -7,7 +7,8 @@ server's audio device. The daemon stores info about all available music,
and this info can be easily searched and retrieved. Player control, info
retrieval, and playlist management can all be managed remotely.
For basic installation information see the INSTALL file.
For basic installation instructions
[read the manual](https://www.musicpd.org/doc/user/install.html).
# Users

View File

@@ -1,10 +1,10 @@
AC_PREREQ(2.60)
AC_INIT(mpd, 0.20.7, musicpd-dev-team@lists.sourceforge.net)
AC_INIT(mpd, 0.20.8, musicpd-dev-team@lists.sourceforge.net)
VERSION_MAJOR=0
VERSION_MINOR=20
VERSION_REVISION=7
VERSION_REVISION=8
VERSION_EXTRA=0
AC_CONFIG_SRCDIR([src/Main.cxx])

View File

@@ -80,8 +80,35 @@
cd mpd-version</programlisting>
<para>
Make sure that all the required libraries and build tools are
installed. The <filename>INSTALL</filename> file has a list.
In any case, you need:
</para>
<itemizedlist>
<listitem>
<para>
a C++14 compiler (e.g. <ulink
url="http://gcc.gnu.org/">gcc 4.9</ulink> or <ulink
url="http://clang.llvm.org/">clang 3.9</ulink>)
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.boost.org/">Boost 1.46</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</ulink>
</para>
</listitem>
</itemizedlist>
<para>
Each plugin usually needs a codec library, which you also need
to install. Check the plugin reference for details about
required libraries.
</para>
<para>
@@ -1035,6 +1062,40 @@ systemctl start mpd.socket</programlisting>
</informaltable>
</section>
<section id="stickers">
<title>The Sticker Database</title>
<para>
"Stickers" are pieces of information attached to songs.
Some clients use them to store ratings and other volatile
data. This feature requires <ulink
url="http://www.sqlite.org/">SQLite</ulink>, compile-time
configure option <parameter>--enable-sqlite</parameter>.
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Setting</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<varname>sticker_file</varname>
<parameter>PATH</parameter>
</entry>
<entry>
The location of the sticker database.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section>
<title>Resource Limitations</title>
@@ -1165,6 +1226,55 @@ systemctl start mpd.socket</programlisting>
</tgroup>
</informaltable>
</section>
<section id="zeroconf">
<title>Zeroconf</title>
<para>
If Zeroconf support (<ulink
url="http://avahi.org/">Avahi</ulink> or Apple's Bonjour)
was enabled at compile time with
<parameter>--with-zeroconf=...</parameter>, MPD can announce
its presence on the network. The following settings control
this feature:
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Setting</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<varname>zeroconf_enabled</varname>
<parameter>yes|no</parameter>
</entry>
<entry>
Enables or disables this feature. Default is
<parameter>yes</parameter>.
</entry>
</row>
<row>
<entry>
<varname>zeroconf_name</varname>
<parameter>NAME</parameter>
</entry>
<entry>
The service name to publish via Zeroconf. The
default is "<parameter>Music Player</parameter>".
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</section>
</chapter>
@@ -2078,7 +2188,9 @@ run</programlisting>
<title><varname>cdio_paranoia</varname></title>
<para>
Plays audio CDs. The URI has the form:
Plays audio CDs using <ulink
url="http://www.gnu.org/software/libcdio/"><filename>libcdio</filename></ulink>.
The URI has the form:
"<filename>cdda://[DEVICE][/TRACK]</filename>". The
simplest form <filename>cdda://</filename> plays the whole
disc in the default drive.
@@ -2114,7 +2226,8 @@ run</programlisting>
<title><varname>curl</varname></title>
<para>
Opens remote files or streams over HTTP.
Opens remote files or streams over HTTP using <ulink
url="http://curl.haxx.se/"><filename>libcurl</filename></ulink>.
</para>
<para>
@@ -2207,7 +2320,8 @@ run</programlisting>
<title><varname>mms</varname></title>
<para>
Plays streams with the MMS protocol.
Plays streams with the MMS protocol using <ulink
url="https://launchpad.net/libmms"><filename>libmms</filename></ulink>.
</para>
</section>
@@ -2263,7 +2377,8 @@ run</programlisting>
<title><varname>adplug</varname></title>
<para>
Decodes AdLib files.
Decodes AdLib files using <ulink
url="http://adplug.sourceforge.net/">libadplug</ulink>.
</para>
<informaltable>
@@ -2294,8 +2409,8 @@ run</programlisting>
<title><varname>audiofile</varname></title>
<para>
Decodes WAV and AIFF files using
<filename>libaudiofile</filename>.
Decodes WAV and AIFF files using <ulink
url="http://audiofile.68k.org/"><filename>libaudiofile</filename></ulink>.
</para>
</section>
@@ -2303,7 +2418,8 @@ run</programlisting>
<title><varname>faad</varname></title>
<para>
Decodes AAC files using <filename>libfaad</filename>.
Decodes AAC files using <ulink
url="http://www.audiocoding.com/"><filename>libfaad</filename></ulink>.
</para>
</section>
@@ -2311,8 +2427,8 @@ run</programlisting>
<title><varname>ffmpeg</varname></title>
<para>
Decodes various codecs using
<application>FFmpeg</application>.
Decodes various codecs using <ulink
url="https://ffmpeg.org/"><application>FFmpeg</application></ulink>.
</para>
<informaltable>
@@ -2363,7 +2479,7 @@ run</programlisting>
<para>
Decodes FLAC files using
<application>libFLAC</application>.
<ulink url="https://xiph.org/flac/"><application>libFLAC</application></ulink>.
</para>
</section>
@@ -2483,7 +2599,8 @@ run</programlisting>
<title><varname>mad</varname></title>
<para>
Decodes MP3 files using <application>libmad</application>.
Decodes MP3 files using <ulink
url="http://www.underbit.com/products/mad/"><application>libmad</application></ulink>.
</para>
</section>
@@ -2563,8 +2680,8 @@ run</programlisting>
<title><varname>mpcdec</varname></title>
<para>
Decodes Musepack files using
<application>libmpcdec</application>.
Decodes Musepack files using <ulink
url="http://www.musepack.net/"><application>libmpcdec</application></ulink>.
</para>
</section>
@@ -2572,7 +2689,17 @@ run</programlisting>
<title><varname>mpg123</varname></title>
<para>
Decodes MP3 files using <application>libmpg123</application>.
Decodes MP3 files using <ulink
url="http://www.mpg123.de/"><application>libmpg123</application></ulink>.
</para>
</section>
<section id="opus_decoder">
<title><varname>opus</varname></title>
<para>
Decodes Opus files using <ulink
url="http://www.opus-codec.org/"><application>libopus</application></ulink>.
</para>
</section>
@@ -2592,8 +2719,8 @@ run</programlisting>
<title><varname>sidplay</varname></title>
<para>
C64 SID decoder based on
<application>libsidplay</application>.
C64 SID decoder based on <ulink
url="http://sidplay2.sourceforge.net/"><application>libsidplay</application></ulink>.
</para>
<informaltable>
@@ -2649,8 +2776,8 @@ run</programlisting>
<title><varname>sndfile</varname></title>
<para>
Decodes WAV and AIFF files using
<filename>libsndfile</filename>.
Decodes WAV and AIFF files using <ulink
url="http://www.mega-nerd.com/libsndfile/"><filename>libsndfile</filename></ulink>.
</para>
</section>
@@ -2658,8 +2785,8 @@ run</programlisting>
<title><varname>vorbis</varname></title>
<para>
Decodes Ogg-Vorbis files using
<application>libvorbis</application>.
Decodes Ogg-Vorbis files using <ulink
url="http://www.xiph.org/ogg/vorbis/"><application>libvorbis</application></ulink>.
</para>
</section>
@@ -2668,7 +2795,7 @@ run</programlisting>
<para>
Decodes WavPack files using
<application>libwavpack</application>.
<ulink url="http://www.wavpack.com/"><application>libwavpack</application></ulink>.
</para>
</section>
@@ -3492,7 +3619,7 @@ run</programlisting>
</informaltable>
</section>
<section>
<section id="jack_output">
<title><varname>jack</varname></title>
<para>
@@ -3772,7 +3899,7 @@ run</programlisting>
</informaltable>
</section>
<section>
<section id="openal_output">
<title><varname>openal</varname></title>
<para>
@@ -3923,7 +4050,7 @@ run</programlisting>
<para>
The <varname>pulse</varname> plugin connects to a <ulink
url="http://www.freedesktop.org/wiki/Software/PulseAudio/"><application>PulseAudio</application></ulink>
server.
server. Requires <filename>libpulse</filename>.
</para>
<informaltable>
@@ -4111,7 +4238,8 @@ run</programlisting>
url="http://www.shoutcast.com/"><application>ShoutCast</application></ulink>
or <ulink
url="http://icecast.org/"><application>IceCast</application></ulink>
server. It forwards tags to this server.
server using <filename>libshout</filename>. It forwards
tags to this server.
</para>
<para>

View File

@@ -58,8 +58,8 @@ libmad = AutotoolsProject(
)
ffmpeg = FfmpegProject(
'http://ffmpeg.org/releases/ffmpeg-3.3.tar.xz',
'599e7f7c017221c22011c4037b88bdcd1c47cd40c1e466838bc3c465f3e9569d',
'http://ffmpeg.org/releases/ffmpeg-3.3.1.tar.xz',
'b702a7fc656ac23e276b8c823a2f646e4e6f6309bb2788435a708e69bea98f2f',
'lib/libavcodec.a',
[
'--disable-shared', '--enable-static',

View File

@@ -121,8 +121,16 @@ static constexpr size_t KILOBYTE = 1024;
static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
static constexpr size_t DEFAULT_BUFFER_SIZE = 4 * MEGABYTE;
static constexpr size_t MIN_BUFFER_SIZE = std::max(CHUNK_SIZE * 32,
64 * KILOBYTE);
static
#if GCC_OLDER_THAN(5,0)
/* gcc 4.x has no "constexpr" for std::max() */
const
#else
constexpr
#endif
size_t MIN_BUFFER_SIZE = std::max(CHUNK_SIZE * 32,
64 * KILOBYTE);
static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10;

View File

@@ -79,7 +79,7 @@ public:
size_t Play(const void *chunk, size_t size);
void Cancel();
std::chrono::steady_clock::duration Delay();
std::chrono::steady_clock::duration Delay() noexcept;
void FillBuffer(void* _buffer, size_t size,
gcc_unused const media_raw_audio_format& _format);
@@ -309,7 +309,7 @@ HaikuOutput::Play(const void *chunk, size_t size)
}
inline std::chrono::steady_clock::duration
HaikuOutput::Delay()
HaikuOutput::Delay() noexcept
{
unsigned delay = buffer_filled ? 0 : buffer_delay;

View File

@@ -670,7 +670,7 @@ osx_output_play(AudioOutput *ao, const void *chunk, size_t size)
}
static std::chrono::steady_clock::duration
osx_output_delay(AudioOutput *ao)
osx_output_delay(AudioOutput *ao) noexcept
{
OSXOutput *od = (OSXOutput *)ao;
return od->ring_buffer->write_available()

View File

@@ -100,7 +100,7 @@ public:
void Open(AudioFormat &audio_format);
void Close();
std::chrono::steady_clock::duration Delay();
std::chrono::steady_clock::duration Delay() noexcept;
size_t Play(const void *chunk, size_t size);
void Cancel();
bool Pause();
@@ -740,7 +740,7 @@ PulseOutput::StreamPause(bool pause)
}
inline std::chrono::steady_clock::duration
PulseOutput::Delay()
PulseOutput::Delay() noexcept
{
Pulse::LockGuard lock(mainloop);

View File

@@ -96,7 +96,7 @@ public:
void Open(AudioFormat &audio_format);
void Close();
std::chrono::steady_clock::duration Delay() {
std::chrono::steady_clock::duration Delay() noexcept {
return pause && !cancel
? std::chrono::milliseconds(100)
: std::chrono::steady_clock::duration::zero();

View File

@@ -146,6 +146,7 @@ static const char *const extm3u_suffixes[] = {
static const char *const extm3u_mime_types[] = {
"audio/x-mpegurl",
"audio/mpegurl",
nullptr
};

View File

@@ -66,6 +66,7 @@ static const char *const m3u_suffixes[] = {
static const char *const m3u_mime_types[] = {
"audio/x-mpegurl",
"audio/mpegurl",
nullptr
};

View File

@@ -49,9 +49,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ByteReverseTest);
void
ByteReverseTest::TestByteReverse2()
{
static const char src[] alignas(uint16_t) = "123456";
alignas(uint16_t) static const char src[] = "123456";
static const char result[] = "214365";
static uint8_t dest[ARRAY_SIZE(src)] alignas(uint16_t);
alignas(uint16_t)static uint8_t dest[ARRAY_SIZE(src)];
reverse_bytes(dest, (const uint8_t *)src,
(const uint8_t *)(src + ARRAY_SIZE(src) - 1), 2);
@@ -73,9 +73,9 @@ ByteReverseTest::TestByteReverse3()
void
ByteReverseTest::TestByteReverse4()
{
static const char src[] alignas(uint32_t) = "12345678";
alignas(uint32_t) static const char src[] = "12345678";
static const char result[] = "43218765";
static uint8_t dest[ARRAY_SIZE(src)] alignas(uint32_t);
alignas(uint32_t) static uint8_t dest[ARRAY_SIZE(src)];
reverse_bytes(dest, (const uint8_t *)src,
(const uint8_t *)(src + ARRAY_SIZE(src) - 1), 4);