Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
35297f8d4f | ||
![]() |
6f4202408c | ||
![]() |
0b6548a282 | ||
![]() |
faf5821816 | ||
![]() |
188673b746 | ||
![]() |
287c70e361 | ||
![]() |
f6b44af998 | ||
![]() |
84c3d9674f | ||
![]() |
47d3758820 | ||
![]() |
573ff3a24f | ||
![]() |
32fcc22cb3 | ||
![]() |
daba1238b5 | ||
![]() |
d125567f4a | ||
![]() |
993eca9327 | ||
![]() |
e314844a4d | ||
![]() |
017bc564af | ||
![]() |
e076ff9085 | ||
![]() |
2789493a5f | ||
![]() |
4ed0635447 | ||
![]() |
1904e504be | ||
![]() |
834715ea2f |
INSTALLMakefile.amNEWSconfigure.ac
doc
src
DecoderAPI.cxxDecoderInternal.cxxDecoderThread.cxxDespotifyUtils.cxxPlayerThread.cxxSongSave.cxx
decoder
encoder
filter
output
util
test
17
INSTALL
17
INSTALL
@@ -3,9 +3,11 @@
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This document is a very small amount of documentation about what is needed to
|
||||
install MPD. If more information is desired see the community wiki at
|
||||
http://mpd.wikia.com.
|
||||
install MPD. If more information is desired, read the user manual:
|
||||
|
||||
http://www.musicpd.org/doc/user/
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
@@ -161,13 +163,9 @@ Get the latest release from of MPD from <http://www.musicpd.org/>.
|
||||
Compile
|
||||
-------
|
||||
|
||||
1) unzip and untar the archive
|
||||
1) unpack the archive
|
||||
|
||||
$ tar zxvf mpd-x.x.x.tar.gz
|
||||
|
||||
or
|
||||
|
||||
$ tar jxvf mpd-x.x.x.tar.bz2
|
||||
$ tar xf mpd-x.x.x.tar.xz
|
||||
|
||||
2) change to directory created
|
||||
|
||||
@@ -208,6 +206,5 @@ Using MPD
|
||||
---------
|
||||
|
||||
You can download many different interfaces for MPD at
|
||||
<http://mpd.wikia.com/wiki/Clients>
|
||||
|
||||
MPD can be interfaced directly using telnet (see COMMANDS, if you are brave).
|
||||
http://www.musicpd.org/clients/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AUTOMAKE_OPTIONS = foreign 1.11 dist-bzip2 dist-xz subdir-objects
|
||||
AUTOMAKE_OPTIONS = foreign 1.11 dist-xz subdir-objects
|
||||
|
||||
AM_CPPFLAGS += -I$(srcdir)/src $(GLIB_CFLAGS)
|
||||
|
||||
|
9
NEWS
9
NEWS
@@ -1,3 +1,12 @@
|
||||
ver 0.18.4 (2013/11/13)
|
||||
* decoder
|
||||
- dsdiff: fix byte order bug
|
||||
* fix build failures due to missing includes
|
||||
* libc++ compatibility
|
||||
|
||||
ver 0.18.3 (2013/11/08)
|
||||
* fix stuck MPD after song change (0.18.2 regression)
|
||||
|
||||
ver 0.18.2 (2013/11/07)
|
||||
* protocol:
|
||||
- "close" flushes the output buffer
|
||||
|
@@ -1,6 +1,6 @@
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
AC_INIT(mpd, 0.18.2, musicpd-dev-team@lists.sourceforge.net)
|
||||
AC_INIT(mpd, 0.18.4, musicpd-dev-team@lists.sourceforge.net)
|
||||
|
||||
VERSION_MAJOR=0
|
||||
VERSION_MINOR=18
|
||||
@@ -8,7 +8,7 @@ VERSION_REVISION=0
|
||||
VERSION_EXTRA=0
|
||||
|
||||
AC_CONFIG_SRCDIR([src/Main.cxx])
|
||||
AM_INIT_AUTOMAKE([foreign 1.11 dist-bzip2 dist-xz subdir-objects])
|
||||
AM_INIT_AUTOMAKE([foreign 1.11 dist-xz subdir-objects])
|
||||
AM_SILENT_RULES
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
@@ -68,12 +68,28 @@ foo(const char *abc, int xyz)
|
||||
<chapter>
|
||||
<title>Hacking The Source</title>
|
||||
|
||||
<para>
|
||||
MPD sources are managed in a git repository on <ulink
|
||||
url="http://git.musicpd.org/">git.musicpd.org</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Always write your code against the latest git:
|
||||
</para>
|
||||
|
||||
<programlisting>git clone git://git.musicpd.org/master/mpd.git</programlisting>
|
||||
|
||||
<para>
|
||||
If you already have a clone, update it:
|
||||
</para>
|
||||
|
||||
<programlisting>git pull --rebase git://git.musicpd.org/master/mpd.git master</programlisting>
|
||||
|
||||
<para>
|
||||
You can do without "--rebase", but we recommend that you rebase
|
||||
your repository on the "master" repository all the time.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Configure with the options <option>--enable-debug
|
||||
--enable-werror</option>. Enable as many plugins as possible,
|
||||
@@ -83,8 +99,55 @@ foo(const char *abc, int xyz)
|
||||
<para>
|
||||
Don't mix several changes in one single patch. Create a
|
||||
separate patch for every change. Tools like
|
||||
<application>stgit</application> help you with that.
|
||||
<application>stgit</application> help you with that. This way,
|
||||
we can review your patches more easily, and we can pick the
|
||||
patches we like most first.
|
||||
</para>
|
||||
|
||||
|
||||
<section>
|
||||
<title> Basic stgit usage</title>
|
||||
|
||||
<para>
|
||||
stgit allows you to create a set of patches and refine all of
|
||||
them: you can go back to any patch at any time, and re-edit it
|
||||
(both the code and the commit message). You can reorder
|
||||
patches and insert new patches at any position. It encourages
|
||||
creating separate patches for tiny changes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
stgit needs to be initialized on a git repository: stg init
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Before you edit the code, create a patch: stg new
|
||||
my-patch-name (stgit now asks you for the commit message).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now edit the code. Once you're finished, you have to "refresh"
|
||||
the patch, i.e. your edits are incorporated into the patch you
|
||||
have created: stg refresh
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You may now continue editing the same patch, and refresh it as
|
||||
often as you like. Create more patches, edit and refresh them.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To view the list of patches, type stg series. To go back to a
|
||||
specific patch, type stg goto my-patch-name; now you can
|
||||
re-edit it (don't forget stg refresh when you're finished with
|
||||
that patch).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When the whole patch series is finished, convert stgit patches
|
||||
to git commits: stg commit
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# An example configuration file for MPD
|
||||
# See the mpd.conf man page for a more detailed description of each parameter.
|
||||
# An example configuration file for MPD.
|
||||
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
|
||||
|
||||
|
||||
# Files and directories #######################################################
|
||||
@@ -204,16 +204,12 @@ input {
|
||||
# blocks. Setting this block is optional, though the server will only attempt
|
||||
# autodetection for one sound card.
|
||||
#
|
||||
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
|
||||
# other audio outputs.
|
||||
#
|
||||
# An example of an ALSA output:
|
||||
#
|
||||
#audio_output {
|
||||
# type "alsa"
|
||||
# name "My ALSA Device"
|
||||
## device "hw:0,0" # optional
|
||||
## format "44100:16:2" # optional
|
||||
## mixer_type "hardware" # optional
|
||||
## mixer_device "default" # optional
|
||||
## mixer_control "PCM" # optional
|
||||
@@ -226,7 +222,6 @@ input {
|
||||
# type "oss"
|
||||
# name "My OSS Device"
|
||||
## device "/dev/dsp" # optional
|
||||
## format "44100:16:2" # optional
|
||||
## mixer_type "hardware" # optional
|
||||
## mixer_device "/dev/mixer" # optional
|
||||
## mixer_control "PCM" # optional
|
||||
@@ -330,12 +325,6 @@ input {
|
||||
# mixer_type "none" # optional
|
||||
#}
|
||||
#
|
||||
# This setting will change all decoded audio to be converted to the specified
|
||||
# format before being passed to the audio outputs. By default, this setting is
|
||||
# disabled.
|
||||
#
|
||||
#audio_output_format "44100:16:2"
|
||||
#
|
||||
# If MPD has been compiled with libsamplerate support, this setting specifies
|
||||
# the sample rate converter to use. Possible values can be found in the
|
||||
# mpd.conf man page or the libsamplerate documentation. By default, this is
|
||||
|
@@ -67,11 +67,11 @@
|
||||
|
||||
<para>
|
||||
Download the source tarball from <ulink
|
||||
url="http://mpd.wikia.com/wiki/Server">the MPD home
|
||||
url="http://www.musicpd.org/download.html">the MPD home
|
||||
page</ulink> and unpack it:
|
||||
</para>
|
||||
|
||||
<programlisting>tar xjf mpd-version.tar.bz
|
||||
<programlisting>tar xf mpd-version.tar.xz
|
||||
cd mpd-version</programlisting>
|
||||
|
||||
<para>
|
||||
@@ -630,7 +630,7 @@ systemctl start mpd.socket</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <ulink url="http://mpd.wikia.com/wiki/Clients">MPD
|
||||
The <ulink url="http://www.musicpd.org/clients/">MPD
|
||||
Wiki</ulink> contains an extensive list of clients to choose
|
||||
from.
|
||||
</para>
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
void
|
||||
decoder_initialized(Decoder &decoder,
|
||||
@@ -283,11 +284,11 @@ decoder_read(Decoder *decoder,
|
||||
assert(nbytes == 0 || !error.IsDefined());
|
||||
assert(nbytes > 0 || error.IsDefined() || is.IsEOF());
|
||||
|
||||
is.Unlock();
|
||||
|
||||
if (gcc_unlikely(nbytes == 0 && error.IsDefined()))
|
||||
LogError(error);
|
||||
|
||||
is.Unlock();
|
||||
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
|
@@ -42,20 +42,12 @@ Decoder::~Decoder()
|
||||
* one.
|
||||
*/
|
||||
static DecoderCommand
|
||||
need_chunks(DecoderControl &dc, bool do_wait)
|
||||
need_chunks(DecoderControl &dc)
|
||||
{
|
||||
if (dc.command == DecoderCommand::STOP ||
|
||||
dc.command == DecoderCommand::SEEK)
|
||||
return dc.command;
|
||||
|
||||
if (do_wait) {
|
||||
if (dc.command == DecoderCommand::NONE)
|
||||
dc.Wait();
|
||||
dc.client_cond.signal();
|
||||
|
||||
return dc.command;
|
||||
}
|
||||
|
||||
return DecoderCommand::NONE;
|
||||
return dc.command;
|
||||
}
|
||||
|
||||
struct music_chunk *
|
||||
@@ -80,7 +72,7 @@ decoder_get_chunk(Decoder &decoder)
|
||||
}
|
||||
|
||||
dc.Lock();
|
||||
cmd = need_chunks(dc, true);
|
||||
cmd = need_chunks(dc);
|
||||
dc.Unlock();
|
||||
} while (cmd == DecoderCommand::NONE);
|
||||
|
||||
|
@@ -38,6 +38,8 @@
|
||||
#include "tag/ApeReplayGain.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <functional>
|
||||
|
||||
static constexpr Domain decoder_thread_domain("decoder_thread");
|
||||
|
||||
/**
|
||||
|
@@ -28,6 +28,8 @@ extern "C" {
|
||||
#include <despotify.h>
|
||||
}
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
const Domain despotify_domain("despotify");
|
||||
|
||||
static struct despotify_session *g_session;
|
||||
|
@@ -36,8 +36,6 @@
|
||||
#include "util/Domain.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
static constexpr Domain player_domain("player");
|
||||
@@ -1043,8 +1041,14 @@ Player::Run()
|
||||
output thread is still busy, so it's
|
||||
okay */
|
||||
|
||||
/* XXX synchronize in a better way */
|
||||
g_usleep(10000);
|
||||
pc.Lock();
|
||||
|
||||
/* wake up the decoder (just in case it's
|
||||
waiting for space in the MusicBuffer) and
|
||||
wait for it */
|
||||
dc.Signal();
|
||||
dc.WaitForDecoder();
|
||||
continue;
|
||||
} else if (IsDecoderAtNextSong()) {
|
||||
/* at the beginning of a new song */
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "util/Domain.hxx"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SONG_MTIME "mtime"
|
||||
#define SONG_END "song_end"
|
||||
|
@@ -47,6 +47,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class DffDsdUint64 {
|
||||
uint32_t hi;
|
||||
uint32_t lo;
|
||||
|
||||
public:
|
||||
constexpr uint64_t Read() const {
|
||||
return (uint64_t(FromBE32(hi)) << 32) |
|
||||
uint64_t(FromBE32(lo));
|
||||
}
|
||||
};
|
||||
|
||||
bool
|
||||
dsdlib_read(Decoder *decoder, InputStream &is,
|
||||
void *data, size_t length);
|
||||
|
@@ -43,13 +43,13 @@
|
||||
|
||||
struct DsdiffHeader {
|
||||
DsdId id;
|
||||
DsdUint64 size;
|
||||
DffDsdUint64 size;
|
||||
DsdId format;
|
||||
};
|
||||
|
||||
struct DsdiffChunkHeader {
|
||||
DsdId id;
|
||||
DsdUint64 size;
|
||||
DffDsdUint64 size;
|
||||
|
||||
/**
|
||||
* Read the "size" attribute from the specified header, converting it
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <glib.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct opus_encoder {
|
||||
/** the base class */
|
||||
|
@@ -56,6 +56,7 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
class RouteFilter final : public Filter {
|
||||
/**
|
||||
|
@@ -30,6 +30,11 @@
|
||||
#include "thread/Mutex.hxx"
|
||||
#include "event/ServerSocket.hxx"
|
||||
|
||||
#ifdef _LIBCPP_VERSION
|
||||
/* can't use incomplete template arguments with libc++ */
|
||||
#include "HttpdClient.hxx"
|
||||
#endif
|
||||
|
||||
#include <forward_list>
|
||||
|
||||
struct config_param;
|
||||
|
@@ -49,12 +49,12 @@ public:
|
||||
*/
|
||||
void AutoCreate();
|
||||
|
||||
result_type min() const {
|
||||
return engine->min();
|
||||
static constexpr result_type min() {
|
||||
return std::mt19937::min();
|
||||
}
|
||||
|
||||
result_type max() const {
|
||||
return engine->max();
|
||||
static constexpr result_type max() {
|
||||
return std::mt19937::max();
|
||||
}
|
||||
|
||||
result_type operator()() {
|
||||
|
@@ -42,7 +42,12 @@ class RefCount {
|
||||
std::atomic_uint n;
|
||||
|
||||
public:
|
||||
constexpr RefCount():n(1) {}
|
||||
#ifndef _LIBCPP_VERSION
|
||||
/* the "constexpr" is missing in libc++'s "atomic"
|
||||
implementation */
|
||||
constexpr
|
||||
#endif
|
||||
RefCount():n(1) {}
|
||||
|
||||
void Increment() {
|
||||
++n;
|
||||
|
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user