Merge commit 'release-0.16.2'
Conflicts: Makefile.am NEWS configure.ac
This commit is contained in:
commit
0c9fc2f809
@ -886,6 +886,7 @@ test_run_input_LDADD = $(MPD_LIBS) \
|
|||||||
$(INPUT_LIBS) \
|
$(INPUT_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_run_input_SOURCES = test/run_input.c \
|
test_run_input_SOURCES = test/run_input.c \
|
||||||
|
test/stdbin.h \
|
||||||
src/conf.c src/tokenizer.c src/utils.c src/string_util.c\
|
src/conf.c src/tokenizer.c src/utils.c src/string_util.c\
|
||||||
src/tag.c src/tag_pool.c src/tag_save.c \
|
src/tag.c src/tag_pool.c src/tag_save.c \
|
||||||
src/fd_util.c \
|
src/fd_util.c \
|
||||||
@ -933,6 +934,7 @@ test_run_decoder_LDADD = $(MPD_LIBS) \
|
|||||||
$(INPUT_LIBS) $(DECODER_LIBS) \
|
$(INPUT_LIBS) $(DECODER_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_run_decoder_SOURCES = test/run_decoder.c \
|
test_run_decoder_SOURCES = test/run_decoder.c \
|
||||||
|
test/stdbin.h \
|
||||||
src/conf.c src/tokenizer.c src/utils.c src/string_util.c src/log.c \
|
src/conf.c src/tokenizer.c src/utils.c src/string_util.c src/log.c \
|
||||||
src/tag.c src/tag_pool.c \
|
src/tag.c src/tag_pool.c \
|
||||||
src/replay_gain_info.c \
|
src/replay_gain_info.c \
|
||||||
@ -973,6 +975,7 @@ test_run_filter_LDADD = $(MPD_LIBS) \
|
|||||||
$(SAMPLERATE_LIBS) \
|
$(SAMPLERATE_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_run_filter_SOURCES = test/run_filter.c \
|
test_run_filter_SOURCES = test/run_filter.c \
|
||||||
|
test/stdbin.h \
|
||||||
src/filter_plugin.c \
|
src/filter_plugin.c \
|
||||||
src/filter_registry.c \
|
src/filter_registry.c \
|
||||||
src/conf.c src/tokenizer.c src/utils.c src/string_util.c \
|
src/conf.c src/tokenizer.c src/utils.c src/string_util.c \
|
||||||
@ -995,6 +998,7 @@ endif
|
|||||||
if ENABLE_ENCODER
|
if ENABLE_ENCODER
|
||||||
noinst_PROGRAMS += test/run_encoder
|
noinst_PROGRAMS += test/run_encoder
|
||||||
test_run_encoder_SOURCES = test/run_encoder.c \
|
test_run_encoder_SOURCES = test/run_encoder.c \
|
||||||
|
test/stdbin.h \
|
||||||
src/conf.c src/tokenizer.c \
|
src/conf.c src/tokenizer.c \
|
||||||
src/utils.c src/string_util.c \
|
src/utils.c src/string_util.c \
|
||||||
src/tag.c src/tag_pool.c \
|
src/tag.c src/tag_pool.c \
|
||||||
@ -1002,12 +1006,15 @@ test_run_encoder_SOURCES = test/run_encoder.c \
|
|||||||
src/audio_format.c \
|
src/audio_format.c \
|
||||||
src/audio_parser.c \
|
src/audio_parser.c \
|
||||||
$(ENCODER_SRC)
|
$(ENCODER_SRC)
|
||||||
|
test_run_encoder_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
$(ENCODER_CFLAGS)
|
||||||
test_run_encoder_LDADD = $(MPD_LIBS) \
|
test_run_encoder_LDADD = $(MPD_LIBS) \
|
||||||
$(ENCODER_LIBS) \
|
$(ENCODER_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_software_volume_SOURCES = test/software_volume.c \
|
test_software_volume_SOURCES = test/software_volume.c \
|
||||||
|
test/stdbin.h \
|
||||||
src/audio_check.c \
|
src/audio_check.c \
|
||||||
src/audio_parser.c \
|
src/audio_parser.c \
|
||||||
src/pcm_volume.c
|
src/pcm_volume.c
|
||||||
@ -1015,6 +1022,7 @@ test_software_volume_LDADD = \
|
|||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
test_run_normalize_SOURCES = test/run_normalize.c \
|
test_run_normalize_SOURCES = test/run_normalize.c \
|
||||||
|
test/stdbin.h \
|
||||||
src/audio_check.c \
|
src/audio_check.c \
|
||||||
src/audio_parser.c \
|
src/audio_parser.c \
|
||||||
src/AudioCompress/compress.c
|
src/AudioCompress/compress.c
|
||||||
@ -1052,6 +1060,7 @@ test_run_output_LDADD = $(MPD_LIBS) \
|
|||||||
$(OUTPUT_LIBS) \
|
$(OUTPUT_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_run_output_SOURCES = test/run_output.c \
|
test_run_output_SOURCES = test/run_output.c \
|
||||||
|
test/stdbin.h \
|
||||||
src/conf.c src/tokenizer.c src/utils.c src/string_util.c src/log.c \
|
src/conf.c src/tokenizer.c src/utils.c src/string_util.c src/log.c \
|
||||||
src/audio_check.c \
|
src/audio_check.c \
|
||||||
src/audio_format.c \
|
src/audio_format.c \
|
||||||
|
21
NEWS
21
NEWS
@ -15,6 +15,21 @@ ver 0.17 (2011/??/??)
|
|||||||
* state_file: add option "restore_paused"
|
* state_file: add option "restore_paused"
|
||||||
|
|
||||||
|
|
||||||
|
ver 0.16.2 (2011/03/18)
|
||||||
|
* configure.ac:
|
||||||
|
- fix bashism in tremor test
|
||||||
|
* decoder:
|
||||||
|
- tremor: fix configure test
|
||||||
|
- gme: detect end of song
|
||||||
|
* encoder:
|
||||||
|
- vorbis: reset the Ogg stream after flush
|
||||||
|
* output:
|
||||||
|
- httpd: fix uninitialized variable
|
||||||
|
- httpd: include sys/socket.h
|
||||||
|
- oss: AFMT_S24_PACKED is little-endian
|
||||||
|
- oss: disable 24 bit playback on FreeBSD
|
||||||
|
|
||||||
|
|
||||||
ver 0.16.1 (2011/01/09)
|
ver 0.16.1 (2011/01/09)
|
||||||
* audio_check: fix parameter in prototype
|
* audio_check: fix parameter in prototype
|
||||||
* add void casts to suppress "result unused" warnings (clang)
|
* add void casts to suppress "result unused" warnings (clang)
|
||||||
@ -145,9 +160,13 @@ ver 0.16 (2010/12/11)
|
|||||||
* make single mode 'sticky'
|
* make single mode 'sticky'
|
||||||
|
|
||||||
|
|
||||||
ver 0.15.16 (2010/??/??)
|
ver 0.15.16 (2011/03/13)
|
||||||
|
* output:
|
||||||
|
- ao: initialize the ao_sample_format struct
|
||||||
|
- jack: fix crash with mono playback
|
||||||
* encoders:
|
* encoders:
|
||||||
- lame: explicitly configure the output sample rate
|
- lame: explicitly configure the output sample rate
|
||||||
|
* update: log all file permission problems
|
||||||
|
|
||||||
|
|
||||||
ver 0.15.15 (2010/11/08)
|
ver 0.15.15 (2010/11/08)
|
||||||
|
12
configure.ac
12
configure.ac
@ -660,7 +660,7 @@ fi
|
|||||||
AM_CONDITIONAL(ENABLE_CDIO_PARANOIA, test x$enable_cdio_paranoia = xyes)
|
AM_CONDITIONAL(ENABLE_CDIO_PARANOIA, test x$enable_cdio_paranoia = xyes)
|
||||||
|
|
||||||
dnl ---------------------------------- libogg ---------------------------------
|
dnl ---------------------------------- libogg ---------------------------------
|
||||||
if test x$with_tremor == xno || test -z $with_tremor; then
|
if test x$with_tremor = xno || test -z $with_tremor; then
|
||||||
PKG_CHECK_MODULES(OGG, [ogg], enable_ogg=yes, enable_ogg=no)
|
PKG_CHECK_MODULES(OGG, [ogg], enable_ogg=yes, enable_ogg=no)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -959,13 +959,19 @@ if test x$enable_tremor = xyes; then
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
CFLAGS="$CFLAGS $TREMOR_CFLAGS"
|
CFLAGS="$CFLAGS $TREMOR_CFLAGS"
|
||||||
LIBS="$LIBS $TREMOR_LIBS"
|
LIBS="$LIBS $TREMOR_LIBS"
|
||||||
AC_CHECK_LIB(vorbisidec,ov_read,enable_vorbis=yes,enable_vorbis=no;
|
AC_CHECK_LIB(vorbisidec,ov_read,,enable_tremor=no;
|
||||||
AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
|
AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$enable_tremor = xyes; then
|
||||||
AC_DEFINE(HAVE_TREMOR,1,
|
AC_DEFINE(HAVE_TREMOR,1,
|
||||||
[Define to use tremor (libvorbisidec) for ogg support])
|
[Define to use tremor (libvorbisidec) for ogg support])
|
||||||
|
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
|
||||||
|
else
|
||||||
|
TREMOR_CFLAGS=
|
||||||
|
TREMOR_LIBS=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(TREMOR_CFLAGS)
|
AC_SUBST(TREMOR_CFLAGS)
|
||||||
@ -1005,7 +1011,7 @@ if test x$enable_vorbis = xyes; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes)
|
AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes || test x$enable_tremor = xyes)
|
||||||
|
|
||||||
dnl --------------------------------- sidplay ---------------------------------
|
dnl --------------------------------- sidplay ---------------------------------
|
||||||
found_sidplay=$HAVE_CXX
|
found_sidplay=$HAVE_CXX
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
enum sample_format {
|
enum sample_format {
|
||||||
SAMPLE_FORMAT_UNDEFINED = 0,
|
SAMPLE_FORMAT_UNDEFINED = 0,
|
||||||
@ -219,6 +220,9 @@ static inline void
|
|||||||
audio_format_mask_apply(struct audio_format *af,
|
audio_format_mask_apply(struct audio_format *af,
|
||||||
const struct audio_format *mask)
|
const struct audio_format *mask)
|
||||||
{
|
{
|
||||||
|
assert(audio_format_valid(af));
|
||||||
|
assert(audio_format_mask_valid(mask));
|
||||||
|
|
||||||
if (mask->sample_rate != 0)
|
if (mask->sample_rate != 0)
|
||||||
af->sample_rate = mask->sample_rate;
|
af->sample_rate = mask->sample_rate;
|
||||||
|
|
||||||
@ -227,6 +231,8 @@ audio_format_mask_apply(struct audio_format *af,
|
|||||||
|
|
||||||
if (mask->channels != 0)
|
if (mask->channels != 0)
|
||||||
af->channels = mask->channels;
|
af->channels = mask->channels;
|
||||||
|
|
||||||
|
assert(audio_format_valid(af));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -192,6 +192,7 @@ audio_format_parse(struct audio_format *dest, const char *src,
|
|||||||
}
|
}
|
||||||
|
|
||||||
audio_format_init(dest, rate, sample_format, channels);
|
audio_format_init(dest, rate, sample_format, channels);
|
||||||
|
assert(audio_format_valid(dest));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -763,7 +763,7 @@ handle_load(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
|
|||||||
result = playlist_open_into_queue(argv[1], &g_playlist,
|
result = playlist_open_into_queue(argv[1], &g_playlist,
|
||||||
client->player_control, true);
|
client->player_control, true);
|
||||||
if (result != PLAYLIST_RESULT_NO_SUCH_LIST)
|
if (result != PLAYLIST_RESULT_NO_SUCH_LIST)
|
||||||
return result;
|
return print_playlist_result(client, result);
|
||||||
|
|
||||||
result = playlist_load_spl(&g_playlist, client->player_control,
|
result = playlist_load_spl(&g_playlist, client->player_control,
|
||||||
argv[1]);
|
argv[1]);
|
||||||
|
@ -153,6 +153,9 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
|
|||||||
if((gme_err = gme_start_track(emu, song_num)) != NULL)
|
if((gme_err = gme_start_track(emu, song_num)) != NULL)
|
||||||
g_warning("%s", gme_err);
|
g_warning("%s", gme_err);
|
||||||
|
|
||||||
|
if(ti->length > 0)
|
||||||
|
gme_set_fade(emu, ti->length);
|
||||||
|
|
||||||
/* play */
|
/* play */
|
||||||
do {
|
do {
|
||||||
gme_err = gme_play(emu, GME_BUFFER_SAMPLES, buf);
|
gme_err = gme_play(emu, GME_BUFFER_SAMPLES, buf);
|
||||||
|
@ -276,6 +276,8 @@ vorbis_encoder_flush(struct encoder *_encoder, G_GNUC_UNUSED GError **error)
|
|||||||
vorbis_analysis_init(&encoder->vd, &encoder->vi);
|
vorbis_analysis_init(&encoder->vd, &encoder->vi);
|
||||||
vorbis_block_init(&encoder->vd, &encoder->vb);
|
vorbis_block_init(&encoder->vd, &encoder->vb);
|
||||||
|
|
||||||
|
ogg_stream_reset(&encoder->os);
|
||||||
|
|
||||||
encoder->flush = true;
|
encoder->flush = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
#undef G_LOG_DOMAIN
|
#undef G_LOG_DOMAIN
|
||||||
#define G_LOG_DOMAIN "ao"
|
#define G_LOG_DOMAIN "ao"
|
||||||
|
|
||||||
|
/* An ao_sample_format, with all fields set to zero: */
|
||||||
|
static const ao_sample_format OUR_AO_FORMAT_INITIALIZER;
|
||||||
|
|
||||||
static unsigned ao_output_ref;
|
static unsigned ao_output_ref;
|
||||||
|
|
||||||
struct ao_data {
|
struct ao_data {
|
||||||
@ -167,7 +170,7 @@ static bool
|
|||||||
ao_output_open(void *data, struct audio_format *audio_format,
|
ao_output_open(void *data, struct audio_format *audio_format,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ao_sample_format format;
|
ao_sample_format format = OUR_AO_FORMAT_INITIALIZER;
|
||||||
struct ao_data *ad = (struct ao_data *)data;
|
struct ao_data *ad = (struct ao_data *)data;
|
||||||
|
|
||||||
switch (audio_format->format) {
|
switch (audio_format->format) {
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBWRAP
|
#ifdef HAVE_LIBWRAP
|
||||||
|
#include <sys/socket.h> /* needed for AF_UNIX */
|
||||||
#include <tcpd.h>
|
#include <tcpd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -123,6 +124,7 @@ httpd_output_init(G_GNUC_UNUSED const struct audio_format *audio_format,
|
|||||||
|
|
||||||
/* initialize metadata */
|
/* initialize metadata */
|
||||||
httpd->metadata = NULL;
|
httpd->metadata = NULL;
|
||||||
|
httpd->unflushed_input = 0;
|
||||||
|
|
||||||
/* initialize encoder */
|
/* initialize encoder */
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ enum {
|
|||||||
MAX_PORTS = 16,
|
MAX_PORTS = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const size_t sample_size = sizeof(jack_default_audio_sample_t);
|
static const size_t jack_sample_size = sizeof(jack_default_audio_sample_t);
|
||||||
|
|
||||||
struct jack_data {
|
struct jack_data {
|
||||||
/**
|
/**
|
||||||
@ -103,9 +103,9 @@ mpd_jack_available(const struct jack_data *jd)
|
|||||||
min = current;
|
min = current;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(min % sample_size == 0);
|
assert(min % jack_sample_size == 0);
|
||||||
|
|
||||||
return min / sample_size;
|
return min / jack_sample_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -123,7 +123,7 @@ mpd_jack_process(jack_nframes_t nframes, void *arg)
|
|||||||
const jack_nframes_t available = mpd_jack_available(jd);
|
const jack_nframes_t available = mpd_jack_available(jd);
|
||||||
for (unsigned i = 0; i < jd->audio_format.channels; ++i)
|
for (unsigned i = 0; i < jd->audio_format.channels; ++i)
|
||||||
jack_ringbuffer_read_advance(jd->ringbuffer[i],
|
jack_ringbuffer_read_advance(jd->ringbuffer[i],
|
||||||
available * sample_size);
|
available * jack_sample_size);
|
||||||
|
|
||||||
/* generate silence while MPD is paused */
|
/* generate silence while MPD is paused */
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ mpd_jack_process(jack_nframes_t nframes, void *arg)
|
|||||||
for (unsigned i = 0; i < jd->audio_format.channels; ++i) {
|
for (unsigned i = 0; i < jd->audio_format.channels; ++i) {
|
||||||
out = jack_port_get_buffer(jd->ports[i], nframes);
|
out = jack_port_get_buffer(jd->ports[i], nframes);
|
||||||
jack_ringbuffer_read(jd->ringbuffer[i],
|
jack_ringbuffer_read(jd->ringbuffer[i],
|
||||||
(char *)out, available * sample_size);
|
(char *)out, available * jack_sample_size);
|
||||||
|
|
||||||
for (jack_nframes_t f = available; f < nframes; ++f)
|
for (jack_nframes_t f = available; f < nframes; ++f)
|
||||||
/* ringbuffer underrun, fill with silence */
|
/* ringbuffer underrun, fill with silence */
|
||||||
@ -675,7 +675,7 @@ mpd_jack_play(void *data, const void *chunk, size_t size, GError **error_r)
|
|||||||
space = space1;
|
space = space1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (space >= frame_size)
|
if (space >= jack_sample_size)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* XXX do something more intelligent to
|
/* XXX do something more intelligent to
|
||||||
@ -683,7 +683,7 @@ mpd_jack_play(void *data, const void *chunk, size_t size, GError **error_r)
|
|||||||
g_usleep(1000);
|
g_usleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
space /= sample_size;
|
space /= jack_sample_size;
|
||||||
if (space < size)
|
if (space < size)
|
||||||
size = space;
|
size = space;
|
||||||
|
|
||||||
|
@ -41,6 +41,15 @@
|
|||||||
# include <sys/soundcard.h>
|
# include <sys/soundcard.h>
|
||||||
#endif /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
|
#endif /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
|
||||||
|
|
||||||
|
/* We got bug reports from FreeBSD users who said that the two 24 bit
|
||||||
|
formats generate white noise on FreeBSD, but 32 bit works. This is
|
||||||
|
a workaround until we know what exactly is expected by the kernel
|
||||||
|
audio drivers. */
|
||||||
|
#ifndef __linux__
|
||||||
|
#undef AFMT_S24_PACKED
|
||||||
|
#undef AFMT_S24_NE
|
||||||
|
#endif
|
||||||
|
|
||||||
struct oss_data {
|
struct oss_data {
|
||||||
int fd;
|
int fd;
|
||||||
const char *device;
|
const char *device;
|
||||||
@ -461,6 +470,12 @@ oss_setup_sample_format(int fd, struct audio_format *audio_format,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
audio_format->format = mpd_format;
|
audio_format->format = mpd_format;
|
||||||
|
|
||||||
|
#ifdef AFMT_S24_PACKED
|
||||||
|
if (oss_format == AFMT_S24_PACKED)
|
||||||
|
audio_format->reverse_endian =
|
||||||
|
G_BYTE_ORDER != G_LITTLE_ENDIAN;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case ERROR:
|
case ERROR:
|
||||||
@ -502,6 +517,12 @@ oss_setup_sample_format(int fd, struct audio_format *audio_format,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
audio_format->format = mpd_format;
|
audio_format->format = mpd_format;
|
||||||
|
|
||||||
|
#ifdef AFMT_S24_PACKED
|
||||||
|
if (oss_format == AFMT_S24_PACKED)
|
||||||
|
audio_format->reverse_endian =
|
||||||
|
G_BYTE_ORDER != G_LITTLE_ENDIAN;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case ERROR:
|
case ERROR:
|
||||||
|
@ -139,6 +139,7 @@ audio_output_open(struct audio_output *ao,
|
|||||||
{
|
{
|
||||||
bool open;
|
bool open;
|
||||||
|
|
||||||
|
assert(audio_format_valid(audio_format));
|
||||||
assert(mp != NULL);
|
assert(mp != NULL);
|
||||||
|
|
||||||
if (ao->fail_timer != NULL) {
|
if (ao->fail_timer != NULL) {
|
||||||
|
@ -96,6 +96,8 @@ ao_filter_open(struct audio_output *ao,
|
|||||||
struct audio_format *audio_format,
|
struct audio_format *audio_format,
|
||||||
GError **error_r)
|
GError **error_r)
|
||||||
{
|
{
|
||||||
|
assert(audio_format_valid(audio_format));
|
||||||
|
|
||||||
/* the replay_gain filter cannot fail here */
|
/* the replay_gain filter cannot fail here */
|
||||||
if (ao->replay_gain_filter != NULL)
|
if (ao->replay_gain_filter != NULL)
|
||||||
filter_open(ao->replay_gain_filter, audio_format, error_r);
|
filter_open(ao->replay_gain_filter, audio_format, error_r);
|
||||||
@ -137,6 +139,7 @@ ao_open(struct audio_output *ao)
|
|||||||
assert(!ao->open);
|
assert(!ao->open);
|
||||||
assert(ao->pipe != NULL);
|
assert(ao->pipe != NULL);
|
||||||
assert(ao->chunk == NULL);
|
assert(ao->chunk == NULL);
|
||||||
|
assert(audio_format_valid(&ao->in_audio_format));
|
||||||
|
|
||||||
if (ao->fail_timer != NULL) {
|
if (ao->fail_timer != NULL) {
|
||||||
/* this can only happen when this
|
/* this can only happen when this
|
||||||
@ -165,6 +168,8 @@ ao_open(struct audio_output *ao)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(audio_format_valid(filter_audio_format));
|
||||||
|
|
||||||
ao->out_audio_format = *filter_audio_format;
|
ao->out_audio_format = *filter_audio_format;
|
||||||
audio_format_mask_apply(&ao->out_audio_format,
|
audio_format_mask_apply(&ao->out_audio_format,
|
||||||
&ao->config_audio_format);
|
&ao->config_audio_format);
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
#ifndef MPD_PIPE_H
|
#ifndef MPD_PIPE_H
|
||||||
#define MPD_PIPE_H
|
#define MPD_PIPE_H
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
struct audio_format;
|
struct audio_format;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -300,6 +300,9 @@ stat_directory(const struct directory *directory, struct stat *st)
|
|||||||
if (path_fs == NULL)
|
if (path_fs == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
ret = stat(path_fs, st);
|
ret = stat(path_fs, st);
|
||||||
|
if (ret < 0)
|
||||||
|
g_warning("Failed to stat %s: %s", path_fs, g_strerror(errno));
|
||||||
|
|
||||||
g_free(path_fs);
|
g_free(path_fs);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -316,6 +319,9 @@ stat_directory_child(const struct directory *parent, const char *name,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
ret = stat(path_fs, st);
|
ret = stat(path_fs, st);
|
||||||
|
if (ret < 0)
|
||||||
|
g_warning("Failed to stat %s: %s", path_fs, g_strerror(errno));
|
||||||
|
|
||||||
g_free(path_fs);
|
g_free(path_fs);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -557,6 +563,7 @@ directory_child_access(const struct directory *directory,
|
|||||||
/* access() is useless on WIN32 */
|
/* access() is useless on WIN32 */
|
||||||
(void)directory;
|
(void)directory;
|
||||||
(void)name;
|
(void)name;
|
||||||
|
(void)mode;
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
char *path = map_directory_child_fs(directory, name);
|
char *path = map_directory_child_fs(directory, name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user