Commit 0caa279e authored by Florian Schlichting's avatar Florian Schlichting

New upstream version 0.21.4

parent 477b2339
*~
.#*
.stgit*
/output/
__pycache__/
ver 0.21.4 (2019/01/04)
* database
- inotify: fix crash bug "terminate called after throwing ..."
- upnp: implement "list ... group"
* output
- httpd: declare protocol "HTTP/1.1" instead of "ICY"
* remove libwrap support
* Windows
- fix "Failed to accept connection: unknown error"
* fix Haiku build
ver 0.21.3 (2018/11/16)
* output
- alsa: fix crash bug
......
......@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.musicpd"
android:installLocation="auto"
android:versionCode="25"
android:versionName="0.21.3">
android:versionCode="26"
android:versionName="0.21.4">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26"/>
......
......@@ -38,7 +38,7 @@ author = 'Max Kellermann'
# built documents.
#
# The short X.Y version.
version = '0.21.3'
version = '0.21.4'
# The full version, including alpha/beta/rc tags.
release = version
......
......@@ -88,7 +88,7 @@ For example, the following installs a fairly complete list of build dependencies
libupnp-dev \
libavahi-client-dev \
libsqlite3-dev \
libsystemd-dev libwrap0-dev \
libsystemd-dev \
libgtest-dev \
libboost-dev \
libicu-dev
......@@ -276,7 +276,9 @@ You can also use multiple storage plugins to assemble a virtual music directory
Configuring database plugins
----------------------------
If a music directory is configured, one database plugin is used. To configure this plugin, add a database block to :file:`mpd.conf`:
If a music directory is configured, one database plugin is used. To
configure this plugin, add a :code:`database` block to
:file:`mpd.conf`:
.. code-block:: none
......@@ -291,7 +293,9 @@ reference.
Configuring neighbor plugins
----------------------------
All neighbor plugins are disabled by default to avoid unwanted overhead. To enable (and configure) a plugin, add a neighbor block to :file:`mpd.conf`:
All neighbor plugins are disabled by default to avoid unwanted
overhead. To enable (and configure) a plugin, add a :code:`neighbor`
block to :file:`mpd.conf`:
.. code-block:: none
......@@ -304,7 +308,8 @@ More information can be found in the :ref:`neighbor_plugin` reference.
Configuring input plugins
-------------------------
To configure an input plugin, add a input block to :file:`mpd.conf`:
To configure an input plugin, add an :code:`input` block to
:file:`mpd.conf`:
.. code-block:: none
......@@ -332,7 +337,8 @@ More information can be found in the :ref:`input_plugins` reference.
Configuring decoder plugins
---------------------------
Most decoder plugins do not need any special configuration. To configure a decoder, add a decoder block to :file:`mpd.conf`:
Most decoder plugins do not need any special configuration. To
configure a decoder, add a :code:`decoder` block to :file:`mpd.conf`:
.. code-block:: none
......@@ -368,7 +374,8 @@ Configuring audio outputs
Audio outputs are devices which actually play the audio chunks produced by :program:`MPD`. You can configure any number of audio output devices, but there must be at least one. If none is configured, :program:`MPD` attempts to auto-detect. Usually, this works quite well with ALSA, OSS and on Mac OS X.
To configure an audio output manually, add one or more audio_output blocks to :file:`mpd.conf`:
To configure an audio output manually, add one or more
:code:`audio_output` blocks to :file:`mpd.conf`:
.. code-block:: none
......@@ -406,14 +413,21 @@ The following table lists the audio_output options valid for all plugins:
* - **always_on yes|no**
- If set to yes, then :program:`MPD` attempts to keep this audio output always open. This may be useful for streaming servers, when you don't want to disconnect all listeners even when playback is accidentally stopped.
* - **mixer_type hardware|software|null|none**
- Specifies which mixer should be used for this audio output: the hardware mixer (available for ALSA :ref:`alsa_plugin`, OSS :ref:`oss_plugin` and PulseAudio :ref:`pulse_plugin`), the software mixer, the "null" mixer (null; allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer :ref:`external_mixer`) or no mixer (none). By default, the hardware mixer is used for devices which support it, and none for the others.
- Specifies which mixer should be used for this audio output: the
hardware mixer (available for ALSA :ref:`alsa_plugin`, OSS
:ref:`oss_plugin` and PulseAudio :ref:`pulse_plugin`), the
software mixer, the ":samp:`null`" mixer (allows setting the
volume, but with no effect; this can be used as a trick to
implement an external mixer :ref:`external_mixer`) or no mixer
(:samp:`none`). By default, the hardware mixer is used for
devices which support it, and none for the others.
Configuring filters
-------------------
Filters are plugins which modify an audio stream.
To configure a filter, add a filter block to :file:`mpd.conf`:
To configure a filter, add a :code:`filter` block to :file:`mpd.conf`:
.. code-block:: none
......@@ -438,9 +452,12 @@ The following table lists the filter options valid for all plugins:
Configuring playlist plugins
----------------------------
Playlist plugins are used to load remote playlists (protocol commands load, listplaylist and listplaylistinfo). This is not related to :program:`MPD`'s playlist directory.
Playlist plugins are used to load remote playlists (protocol commands
load, listplaylist and listplaylistinfo). This is not related to
:program:`MPD`'s :ref:`playlist directory <stored_playlists>`.
To configure a playlist plugin, add a playlist_plugin block to :file:`mpd.conf`:
To configure a playlist plugin, add a :code:`playlist_plugin` block to
:file:`mpd.conf`:
.. code-block:: none
......@@ -817,10 +834,16 @@ The queue
The queue (sometimes called "current playlist") is a list of songs to be played by :program:`MPD`. To play a song, add it to the queue and start playback. Most clients offer an interface to edit the queue.
.. _stored_playlists:
Stored Playlists
----------------
Stored playlists are some kind of secondary playlists which can be created, saved, edited and deleted by the client. They are addressed by their names. Its contents can be loaded into the queue, to be played back. The playlist_directory setting specifies where those playlists are stored.
Stored playlists are some kind of secondary playlists which can be
created, saved, edited and deleted by the client. They are addressed
by their names. Its contents can be loaded into the queue, to be
played back. The :code:`playlist_directory` setting specifies where
those playlists are stored.
Advanced usage
**************
......@@ -860,9 +883,11 @@ Obey the "format" row, which indicates that the current playback format is 16 bi
Check list for bit-perfect playback:
* Use the ALSA output plugin.
* Disable sound processing inside ALSA by configuring a "hardware" device (hw:0,0 or similar).
* Don't use software volume (setting mixer_type).
* Don't force :program:`MPD` to use a specific audio format (settings format, audio_output_format).
* Disable sound processing inside ALSA by configuring a "hardware"
device (:samp:`hw:0,0` or similar).
* Don't use software volume (setting :code:`mixer_type`).
* Don't force :program:`MPD` to use a specific audio format (settings
:code:`format`, :code:`audio_output_format`).
* Verify that you are really doing bit-perfect playback using :program:`MPD`'s verbose log and :file:`/proc/asound/card*/pcm*p/sub*/hw_params`. Some DACs can also indicate the audio format.
Direct Stream Digital (DSD)
......@@ -877,7 +902,11 @@ DSD (`Direct Stream Digital <https://en.wikipedia.org/wiki/Direct_Stream_Digital
* DoP (DSD over PCM) playback. This wraps DSD inside fake 24 bit PCM according to the DoP standard. Requires a DAC that supports DSD. No support from ALSA and the sound chip required (except for bit-perfect 24 bit PCM support).
* Convert DSD to PCM on-the-fly.
Native DSD playback is used automatically if available. DoP is only used if enabled explicitly using the dop option, because there is no way for :program:`MPD` to find out whether the DAC supports it. DSD to PCM conversion is the fallback if DSD cannot be used directly.
Native DSD playback is used automatically if available. DoP is only
used if enabled explicitly using the :code:`dop` option, because there
is no way for :program:`MPD` to find out whether the DAC supports
it. DSD to PCM conversion is the fallback if DSD cannot be used
directly.
Client Hacks
************
......
project(
'mpd',
['c', 'cpp'],
version: '0.21.3',
version: '0.21.4',
meson_version: '>= 0.47.2',
default_options: [
'c_std=c99',
......@@ -20,7 +20,7 @@ conf.set_quoted('PACKAGE', meson.project_name())
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('PROTOCOL_VERSION', '0.21.0')
conf.set_quoted('PROTOCOL_VERSION', '0.21.4')
conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf'))
common_cppflags = [
......@@ -99,7 +99,7 @@ is_linux = host_machine.system() == 'linux'
is_android = get_option('android_ndk') != ''
is_darwin = host_machine.system() == 'darwin'
is_windows = host_machine.system() == 'windows'
is_haiku = host_machine.system() == 'haiku' # TODO is this correct?
is_haiku = host_machine.system() == 'haiku'
if is_android
common_cppflags += '-DANDROID'
......@@ -312,7 +312,6 @@ subdir('src/lib/curl')
subdir('src/lib/expat')
subdir('src/lib/ffmpeg')
subdir('src/lib/gcrypt')
subdir('src/lib/wrap')
subdir('src/lib/nfs')
subdir('src/lib/oss')
subdir('src/lib/pcre')
......@@ -432,7 +431,6 @@ mpd = build_target(
systemd_dep,
sqlite_dep,
zeroconf_dep,
libwrap_dep,
more_deps,
],
link_args: link_args,
......
......@@ -175,7 +175,6 @@ option('dbus', type: 'feature', description: 'D-Bus support')
option('expat', type: 'feature', description: 'Expat XML support')
option('icu', type: 'feature', description: 'Use libicu for Unicode')
option('iconv', type: 'feature', description: 'Use iconv() for character set conversion')
option('libwrap', type: 'feature', description: 'libwrap support')
option('pcre', type: 'feature', description: 'Enable regular expression support (using libpcre)')
option('sqlite', type: 'feature', description: 'SQLite database support (for stickers)')
option('yajl', type: 'feature', description: 'libyajl for YAML support')
......
#!/usr/bin/env ruby
#
# This script verifies that every source includes config.h first.
# This is very important for consistent Large File Support.
#
def check_file(file)
first = true
file.each_line do |line|
if line =~ /^\#include\s+(\S+)/ then
if $1 == '"config.h"'
unless first
puts "#{file.path}: config.h included too late"
end
else
if first
puts "#{file.path}: config.h missing"
end
end
first = false
end
end
end
def check_path(path)
File.open(path) do |file|
check_file(file)
end
end
if ARGV.empty?
Dir["src/*.c"].each do |path|
check_path(path)
end
Dir["src/*/*.c"].each do |path|
check_path(path)
end
Dir["test/*.c"].each do |path|
check_path(path)
end
else
ARGV.each do |path|
check_path(path)
end
end
......@@ -22,7 +22,6 @@
*
*/
#include "config.h"
#include "AudioParser.hxx"
#include "AudioFormat.hxx"
#include "util/RuntimeError.hxx"
......
......@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "CheckAudioFormat.hxx"
#include "AudioFormat.hxx"
#include "util/RuntimeError.hxx"
......
......@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "IcyMetaDataParser.hxx"
#include "tag/Tag.hxx"
#include "tag/Builder.hxx"
......
......@@ -22,7 +22,6 @@
*
*/
#include "config.h"
#include "Idle.hxx"
#include "Main.hxx"
#include "Instance.hxx"
......
......@@ -22,7 +22,6 @@
*
*/
#include "config.h"
#include "IdleFlags.hxx"
#include "util/ASCII.hxx"
......
......@@ -20,7 +20,7 @@
#ifndef MPD_INSTANCE_HXX
#define MPD_INSTANCE_HXX
#include "check.h"
#include "config.h"
#include "event/Loop.hxx"
#include "event/Thread.hxx"
#include "event/MaskMonitor.hxx"
......
......@@ -20,7 +20,7 @@
#ifndef MPD_LOCATE_URI_HXX
#define MPD_LOCATE_URI_HXX
#include "check.h"
#include "config.h"
#include "util/Compiler.h"
#include "fs/AllocatedPath.hxx"
......
......@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "LogV.hxx"
#include "util/Domain.hxx"
......
......@@ -17,11 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "LogBackend.hxx"
#include "Log.hxx"
#include "util/Domain.hxx"
#include "util/StringStrip.hxx"
#include "config.h"
#include <assert.h>
#include <stdio.h>
......
......@@ -20,7 +20,6 @@
#ifndef MPD_LOG_BACKEND_HXX
#define MPD_LOG_BACKEND_HXX
#include "check.h"
#include "LogLevel.hxx"
void
......
......@@ -192,7 +192,7 @@ glue_db_init_and_load(const ConfigData &config)
if (instance->database == nullptr)
return true;
if (instance->database->GetPlugin().flags & DatabasePlugin::FLAG_REQUIRE_STORAGE) {
if (instance->database->GetPlugin().RequireStorage()) {
InitStorage(config, instance->io_thread.GetEventLoop());
if (instance->storage == nullptr) {
......@@ -216,17 +216,17 @@ glue_db_init_and_load(const ConfigData &config)
std::throw_with_nested(std::runtime_error("Failed to open database plugin"));
}
if (!instance->database->IsPlugin(simple_db_plugin))
auto *db = dynamic_cast<SimpleDatabase *>(instance->database);
if (db == nullptr)
return true;
SimpleDatabase &db = *(SimpleDatabase *)instance->database;
instance->update = new UpdateService(config,
instance->event_loop, db,
instance->event_loop, *db,
static_cast<CompositeStorage &>(*instance->storage),
*instance);
/* run database update after daemonization? */
return db.FileExists();
return db->FileExists();
}
static bool
......
......@@ -24,9 +24,10 @@
#ifndef MPD_MAPPER_HXX
#define MPD_MAPPER_HXX
#include <string>
#include "util/Compiler.h"
#include "config.h"
#include <string>
#define PLAYLIST_FILE_SUFFIX ".m3u"
......