Commit 4e13c5e9 authored by Florian Schlichting's avatar Florian Schlichting

Imported Upstream version 0.18.13

parent 3832f02c
......@@ -151,7 +151,7 @@ src_mpd_SOURCES = \
src/IOThread.cxx src/IOThread.hxx \
src/Main.cxx src/Main.hxx \
src/Instance.cxx src/Instance.hxx \
src/Win32Main.cxx \
src/win32/Win32Main.cxx \
src/GlobalEvents.cxx src/GlobalEvents.hxx \
src/Daemon.cxx src/Daemon.hxx \
src/AudioCompress/compress.c \
......@@ -211,14 +211,14 @@ src_mpd_SOURCES = \
# Windows resource file
#
src/win/mpd_win32_rc.$(OBJEXT): src/win/mpd_win32_rc.rc
src/win32/mpd_win32_rc.$(OBJEXT): src/win32/mpd_win32_rc.rc
$(WINDRES) -i $< -o $@
if HAVE_WINDOWS
noinst_DATA = src/win/mpd_win32_rc.rc
noinst_DATA = src/win32/mpd_win32_rc.rc
src_mpd_DEPENDENCIES = src/win/mpd_win32_rc.$(OBJEXT)
src_mpd_LDFLAGS = -Wl,src/win/mpd_win32_rc.$(OBJEXT)
EXTRA_src_mpd_DEPENDENCIES = src/win32/mpd_win32_rc.$(OBJEXT)
src_mpd_LDFLAGS = -Wl,src/win32/mpd_win32_rc.$(OBJEXT)
endif
if ENABLE_DESPOTIFY
......@@ -1633,4 +1633,4 @@ EXTRA_DIST = $(doc_DATA) autogen.sh \
test/test_archive_zzip.sh \
$(wildcard scripts/*.sh) \
$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
src/win/mpd_win32_rc.rc.in src/win/mpd.ico
src/win32/mpd_win32_rc.rc.in src/win32/mpd.ico
This diff is collapsed.
ver 0.18.13 (2014/08/31)
* protocol
- don't change song on "seekcur" in random mode
* decoder
- dsdiff, dsf: fix endless loop on malformed file
- ffmpeg: support ffmpeg/libav version 11
- gme: fix song duration
* output
- alsa: fix endless loop at end of file in dsd_usb mode
* fix state file saver
* fix build failure on Darwin
ver 0.18.12 (2014/07/30)
* database
- proxy: fix build failure with libmpdclient 2.2
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for mpd 0.18.12.
# Generated by GNU Autoconf 2.69 for mpd 0.18.13.
#
# Report bugs to <mpd-devel@musicpd.org>.
#
......@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='mpd'
PACKAGE_TARNAME='mpd'
PACKAGE_VERSION='0.18.12'
PACKAGE_STRING='mpd 0.18.12'
PACKAGE_VERSION='0.18.13'
PACKAGE_STRING='mpd 0.18.13'
PACKAGE_BUGREPORT='mpd-devel@musicpd.org'
PACKAGE_URL=''
......@@ -1673,7 +1673,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures mpd 0.18.12 to adapt to many kinds of systems.
\`configure' configures mpd 0.18.13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1743,7 +1743,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of mpd 0.18.12:";;
short | recursive ) echo "Configuration of mpd 0.18.13:";;
esac
cat <<\_ACEOF
......@@ -2041,7 +2041,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
mpd configure 0.18.12
mpd configure 0.18.13
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2494,7 +2494,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by mpd $as_me 0.18.12, which was
It was created by mpd $as_me 0.18.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3364,7 +3364,7 @@ fi
# Define the identity of the package.
PACKAGE='mpd'
VERSION='0.18.12'
VERSION='0.18.13'
cat >>confdefs.h <<_ACEOF
......@@ -5563,7 +5563,7 @@ host_is_darwin=no
case "$host_os" in
mingw32* | windows*)
ac_config_files="$ac_config_files src/win/mpd_win32_rc.rc"
ac_config_files="$ac_config_files src/win32/mpd_win32_rc.rc"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
......@@ -18461,7 +18461,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by mpd $as_me 0.18.12, which was
This file was extended by mpd $as_me 0.18.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -18527,7 +18527,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
mpd config.status 0.18.12
mpd config.status 0.18.13
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......@@ -18658,7 +18658,7 @@ do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"src/win/mpd_win32_rc.rc") CONFIG_FILES="$CONFIG_FILES src/win/mpd_win32_rc.rc" ;;
"src/win32/mpd_win32_rc.rc") CONFIG_FILES="$CONFIG_FILES src/win32/mpd_win32_rc.rc" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"doc/doxygen.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen.conf" ;;
"mpd.service") CONFIG_FILES="$CONFIG_FILES mpd.service" ;;
......
AC_PREREQ(2.60)
AC_INIT(mpd, 0.18.12, mpd-devel@musicpd.org)
AC_INIT(mpd, 0.18.13, mpd-devel@musicpd.org)
VERSION_MAJOR=0
VERSION_MINOR=18
......@@ -70,7 +70,7 @@ host_is_darwin=no
case "$host_os" in
mingw32* | windows*)
AC_CONFIG_FILES([
src/win/mpd_win32_rc.rc
src/win32/mpd_win32_rc.rc
])
AC_CHECK_TOOL(WINDRES, windres)
AM_CPPFLAGS="$AM_CPPFLAGS -DWIN32_LEAN_AND_MEAN"
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = MPD
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.18.12
PROJECT_NUMBER = 0.18.13
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -576,7 +576,12 @@
</listitem>
<listitem>
<para>
<varname>songs</varname>: number of albums
<varname>albums</varname>: number of albums
</para>
</listitem>
<listitem>
<para>
<varname>songs</varname>: number of songs
</para>
</listitem>
<listitem>
......
......@@ -234,6 +234,10 @@ public:
void PlayPrevious(PlayerControl &pc);
PlaylistResult SeekSongOrder(PlayerControl &pc,
unsigned song_order,
float seek_time);
PlaylistResult SeekSongPosition(PlayerControl &pc,
unsigned song_position,
float seek_time);
......
......@@ -190,17 +190,12 @@ playlist::PlayPrevious(PlayerControl &pc)
}
PlaylistResult
playlist::SeekSongPosition(PlayerControl &pc, unsigned song, float seek_time)
playlist::SeekSongOrder(PlayerControl &pc, unsigned i, float seek_time)
{
if (!queue.IsValidPosition(song))
return PlaylistResult::BAD_RANGE;
assert(queue.IsValidOrder(i));
const Song *queued_song = GetQueuedSong();
unsigned i = queue.random
? queue.PositionToOrder(song)
: song;
pc.ClearError();
stop_on_error = true;
error_count = 0;
......@@ -228,6 +223,19 @@ playlist::SeekSongPosition(PlayerControl &pc, unsigned song, float seek_time)
return PlaylistResult::SUCCESS;
}
PlaylistResult
playlist::SeekSongPosition(PlayerControl &pc, unsigned song, float seek_time)
{
if (!queue.IsValidPosition(song))
return PlaylistResult::BAD_RANGE;
unsigned i = queue.random
? queue.PositionToOrder(song)
: song;
return SeekSongOrder(pc, i, seek_time);
}
PlaylistResult
playlist::SeekSongId(PlayerControl &pc, unsigned id, float seek_time)
{
......@@ -257,5 +265,5 @@ playlist::SeekCurrent(PlayerControl &pc, float seek_time, bool relative)
if (seek_time < 0)
seek_time = 0;
return SeekSongPosition(pc, current, seek_time);
return SeekSongOrder(pc, current, seek_time);
}
......@@ -377,7 +377,7 @@ dsdiff_decode_chunk(Decoder &decoder, InputStream &is,
const unsigned buffer_samples = buffer_frames * frame_size;
const size_t buffer_size = buffer_samples * sample_size;
while (chunk_size > 0) {
while (chunk_size >= frame_size) {
/* see how much aligned data from the remaining chunk
fits into the local buffer */
size_t now_size = buffer_size;
......
......@@ -238,7 +238,7 @@ dsf_decode_chunk(Decoder &decoder, InputStream &is,
const unsigned buffer_samples = buffer_frames * frame_size;
const size_t buffer_size = buffer_samples * sample_size;
while (chunk_size > 0) {
while (chunk_size >= frame_size) {
/* see how much aligned data from the remaining chunk
fits into the local buffer */
size_t now_size = buffer_size;
......
......@@ -433,9 +433,18 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
AVStream *av_stream = format_context->streams[audio_stream];
AVCodecContext *codec_context = av_stream->codec;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 25, 0)
const AVCodecDescriptor *codec_descriptor =
avcodec_descriptor_get(codec_context->codec_id);
if (codec_descriptor != nullptr)
FormatDebug(ffmpeg_domain, "codec '%s'",
codec_descriptor->name);
#else
if (codec_context->codec_name[0] != 0)
FormatDebug(ffmpeg_domain, "codec '%s'",
codec_context->codec_name);
#endif
AVCodec *codec = avcodec_find_decoder(codec_context->codec_id);
......
......@@ -235,7 +235,7 @@ gme_scan_file(const char *path_fs,
if (ti->length > 0)
tag_handler_invoke_duration(handler, handler_ctx,
ti->length / 100);
ti->length / 1000);
if (ti->song != nullptr) {
if (gme_track_count(emu) > 1) {
......
......@@ -118,7 +118,7 @@ BufferedSocket::OnSocketReady(unsigned flags)
if (!ReadToBuffer() || !ResumeInput())
return false;
if (input.IsFull())
if (!input.IsFull())
ScheduleRead();
}
......
......@@ -64,7 +64,9 @@ TimeoutMonitor::ScheduleSeconds(unsigned s)
void
TimeoutMonitor::Run()
{
#ifndef USE_EPOLL
#ifdef USE_EPOLL
active = false;
#else
Cancel();
#endif
......
......@@ -802,6 +802,7 @@ alsa_play(struct audio_output *ao, const void *chunk, size_t size,
{
AlsaOutput *ad = (AlsaOutput *)ao;
assert(size > 0);
assert(size % ad->in_frame_size == 0);
if (ad->must_prepare) {
......@@ -814,11 +815,21 @@ alsa_play(struct audio_output *ao, const void *chunk, size_t size,
}
}
const size_t original_size = size;
chunk = ad->pcm_export->Export(chunk, size, size);
if (size == 0)
/* the DoP (DSD over PCM) filter converts two frames
at a time and ignores the last odd frame; if there
was only one frame (e.g. the last frame in the
file), the result is empty; to avoid an endless
loop, bail out here, and pretend the one frame has
been played */
return original_size;
assert(size % ad->out_frame_size == 0);
size /= ad->out_frame_size;
assert(size > 0);
while (true) {
snd_pcm_sframes_t ret = ad->writei(ad->pcm, chunk, size);
......
......@@ -727,6 +727,8 @@ oss_output_play(struct audio_output *ao, const void *chunk, size_t size,
OssOutput *od = (OssOutput *)ao;
ssize_t ret;
assert(size > 0);
/* reopen the device since it was closed by dropBufferedAudio */
if (od->fd < 0 && !oss_reopen(od, error))
return 0;
......@@ -735,6 +737,8 @@ oss_output_play(struct audio_output *ao, const void *chunk, size_t size,
chunk = od->pcm_export->Export(chunk, size, size);
#endif
assert(size > 0);
while (true) {
ret = write(od->fd, chunk, size);
if (ret > 0) {
......
......@@ -40,6 +40,16 @@
/* well-known big-endian */
# define IS_LITTLE_ENDIAN false
# define IS_BIG_ENDIAN true
#elif defined(__APPLE__)
/* compile-time check for MacOS */
# include <machine/endian.h>
# if BYTE_ORDER == LITTLE_ENDIAN
# define IS_LITTLE_ENDIAN true
# define IS_BIG_ENDIAN false
# else
# define IS_LITTLE_ENDIAN false
# define IS_BIG_ENDIAN true
# endif
#else
/* generic compile-time check */
# include <endian.h>
......
......@@ -33,7 +33,7 @@
#include "Compiler.h"
#include <assert.h>
#include <string.h>
#include <strings.h>
/**
* Determine whether two strings are equal, ignoring case for ASCII
......
......@@ -3,7 +3,7 @@
#define VERSION_NUMBER @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@
#define VERSION_NUMBER_STR "@VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@"
MPD_ICON ICON "@top_srcdir@/src/win/mpd.ico"
MPD_ICON ICON "@top_srcdir@/src/win32/mpd.ico"
1 VERSIONINFO
FILETYPE VFT_APP
......
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