Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
86e8b3b4bd | ||
![]() |
a26ead035a | ||
![]() |
704be54c3a | ||
![]() |
2406152576 | ||
![]() |
af260b5a64 | ||
![]() |
4efa96df21 | ||
![]() |
8b62127770 | ||
![]() |
f06fe1ea98 | ||
![]() |
d16fb79708 | ||
![]() |
c38f29ce56 | ||
![]() |
78abcd7df7 | ||
![]() |
23dce21647 | ||
![]() |
40280fa6cf | ||
![]() |
fe9299ceff | ||
![]() |
c3f111a56c | ||
![]() |
250318329f | ||
![]() |
14c538c9c7 | ||
![]() |
abe4c57663 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -40,7 +40,7 @@ tags
|
||||
.#*
|
||||
.stgit*
|
||||
src/dsd2pcm/dsd2pcm
|
||||
src/win/mpd_win32_rc.rc
|
||||
src/win32/mpd_win32_rc.rc
|
||||
doc/doxygen.conf
|
||||
doc/protocol.html
|
||||
doc/protocol
|
||||
|
12
Makefile.am
12
Makefile.am
@@ -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
|
||||
|
12
NEWS
12
NEWS
@@ -1,3 +1,15 @@
|
||||
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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
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"
|
||||
|
@@ -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
|
||||
|
Before (image error) Size: 345 KiB After (image error) Size: 345 KiB |
@@ -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
|
Reference in New Issue
Block a user