Commit 85115798 authored by Led's avatar Led

Merge commit '0.14-alpha3' into alt

parents cd6cf8d0 1a029af0
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for mpd 0.14~alpha2.
# Generated by GNU Autoconf 2.63 for mpd 0.14~alpha3.
#
# Report bugs to <musicpd-dev-team@lists.sourceforge.net>.
#
......@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='mpd'
PACKAGE_TARNAME='mpd'
PACKAGE_VERSION='0.14~alpha2'
PACKAGE_STRING='mpd 0.14~alpha2'
PACKAGE_VERSION='0.14~alpha3'
PACKAGE_STRING='mpd 0.14~alpha3'
PACKAGE_BUGREPORT='musicpd-dev-team@lists.sourceforge.net'
ac_unique_file="src/main.c"
......@@ -1478,7 +1478,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.14~alpha2 to adapt to many kinds of systems.
\`configure' configures mpd 0.14~alpha3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1548,7 +1548,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of mpd 0.14~alpha2:";;
short | recursive ) echo "Configuration of mpd 0.14~alpha3:";;
esac
cat <<\_ACEOF
......@@ -1746,7 +1746,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
mpd configure 0.14~alpha2
mpd configure 0.14~alpha3
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
......@@ -1760,7 +1760,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.14~alpha2, which was
It was created by mpd $as_me 0.14~alpha3, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
......@@ -2457,7 +2457,7 @@ fi
# Define the identity of the package.
PACKAGE='mpd'
VERSION='0.14~alpha2'
VERSION='0.14~alpha3'
cat >>confdefs.h <<_ACEOF
......@@ -12937,7 +12937,7 @@ exec 6>&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.14~alpha2, which was
This file was extended by mpd $as_me 0.14~alpha3, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -13000,7 +13000,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
mpd config.status 0.14~alpha2
mpd config.status 0.14~alpha3
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
......
AC_PREREQ(2.60)
AC_INIT(mpd, 0.14~alpha2, musicpd-dev-team@lists.sourceforge.net)
AC_INIT(mpd, 0.14~alpha3, musicpd-dev-team@lists.sourceforge.net)
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([foreign 1.9 dist-bzip2])
AM_CONFIG_HEADER(config.h)
......
......@@ -994,10 +994,7 @@ mp3_read(struct mp3_data *data, struct replay_gain_info **replay_gain_info_r)
cmd = mp3_synth_and_send(data,
replay_gain_info_r != NULL
? *replay_gain_info_r : NULL);
if (cmd != DECODE_COMMAND_NONE)
return false;
if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) {
if (cmd == DECODE_COMMAND_SEEK) {
unsigned long j;
assert(data->input_stream->seekable);
......@@ -1015,7 +1012,8 @@ mp3_read(struct mp3_data *data, struct replay_gain_info **replay_gain_info_r)
data->mute_frame = MUTEFRAME_SEEK;
decoder_command_finished(decoder);
}
}
} else if (cmd != DECODE_COMMAND_NONE)
return false;
}
while (true) {
......
......@@ -168,6 +168,9 @@ need_chunks(struct input_stream *is, bool wait)
if ((is == NULL || input_stream_buffer(is) <= 0) && wait) {
notify_wait(&dc.notify);
notify_signal(&pc.notify);
if (dc.command != DECODE_COMMAND_STOP)
return dc.command;
}
return DECODE_COMMAND_NONE;
......
......@@ -75,6 +75,9 @@ mpd_log_func(G_GNUC_UNUSED const gchar *log_domain,
? stderr : stdout;
char *converted;
if (log_level > (int)log_threshold)
return;
if (log_charset != NULL) {
converted = g_convert_with_fallback(message, -1,
log_charset, "utf-8",
......
......@@ -153,6 +153,9 @@ static void player_process_command(struct player *player)
case PLAYER_COMMAND_QUEUE:
assert(pc.next_song != NULL);
assert(!player->queued);
assert(player->next_song_chunk == -1);
player->queued = true;
player_command_finished();
break;
......@@ -352,10 +355,12 @@ static void do_play(void)
#endif
if (decoder_is_idle() && !player.queued &&
player.next_song_chunk < 0 &&
pc.next_song != NULL &&
pc.command == PLAYER_COMMAND_NONE) {
/* the decoder has finished the current song;
request the next song from the playlist */
pc.next_song = NULL;
wakeup_main_task();
}
......@@ -429,6 +434,7 @@ static void do_play(void)
/* wait for the
decoder */
music_pipe_set_lazy(false);
notify_signal(&dc.notify);
notify_wait(&pc.notify);
continue;
}
......
......@@ -79,14 +79,28 @@ static int volume_alsaSet = -1;
#ifdef HAVE_OSS
#include <alloca.h> /* only alloca user in mpd atm, may change ... */
static void closeOssMixer(void)
{
while (close(volume_ossFd) && errno == EINTR) ;
volume_ossFd = -1;
}
static int
oss_find_mixer(const char *name)
{
const char *labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
size_t name_length = strlen(name);
for (unsigned i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
if (strncasecmp(name, labels[i], name_length) == 0 &&
(labels[i][name_length] == 0 ||
labels[i][name_length] == ' '))
return i;
}
return -1;
}
static int prepOssMixer(const char *device)
{
ConfigParam *param;
......@@ -97,7 +111,6 @@ static int prepOssMixer(const char *device)
}
if ((param = getConfigParam(CONF_MIXER_CONTROL))) {
const char *labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
int i;
int devmask = 0;
......@@ -107,20 +120,9 @@ static int prepOssMixer(const char *device)
return -1;
}
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
ssize_t len = strlen(labels[i]);
char *duplicated = alloca(len + 1);
/* eliminate spaces at the end */
memcpy(duplicated, labels[i], len + 1);
len -= 2;
while (len >= 0 && duplicated[len] == ' ')
duplicated[len--] = '\0';
if (strcasecmp(duplicated, param->value) == 0)
break;
}
i = oss_find_mixer(param->value);
if (i >= SOUND_MIXER_NRDEVICES) {
if (i < 0) {
WARNING("mixer control \"%s\" not found at line %i\n",
param->value, param->line);
closeOssMixer();
......
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