Merge branch 'v0.16.x'
This commit is contained in:
commit
b43bf4dd74
2
NEWS
2
NEWS
@ -39,6 +39,8 @@ ver 0.16.5 (2010/??/??)
|
|||||||
- ffmpeg: higher precision timestamps
|
- ffmpeg: higher precision timestamps
|
||||||
- ffmpeg: don't require key frame for seeking
|
- ffmpeg: don't require key frame for seeking
|
||||||
- fix CUE track seeking
|
- fix CUE track seeking
|
||||||
|
* output:
|
||||||
|
- openal: auto-fallback to mono if channel count is unsupported
|
||||||
* player:
|
* player:
|
||||||
- make seeking to CUE track more reliable
|
- make seeking to CUE track more reliable
|
||||||
- the "seek" command works when MPD is stopped
|
- the "seek" command works when MPD is stopped
|
||||||
|
10
configure.ac
10
configure.ac
@ -36,7 +36,15 @@ AC_PROG_MAKE_SET
|
|||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
AC_ARG_WITH([systemdsystemunitdir],
|
AC_ARG_WITH([systemdsystemunitdir],
|
||||||
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
||||||
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
|
[], [with_systemdsystemunitdir=no])
|
||||||
|
if test "x$with_systemdsystemunitdir" = xyes; then
|
||||||
|
AC_MSG_CHECKING(for systemd)
|
||||||
|
with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
|
||||||
|
if test -z "$with_systemdsystemunitdir"; then
|
||||||
|
AC_MSG_ERROR([Failed to detect systemd])
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$with_systemdsystemunitdir])
|
||||||
|
fi
|
||||||
if test "x$with_systemdsystemunitdir" != xno; then
|
if test "x$with_systemdsystemunitdir" != xno; then
|
||||||
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
||||||
fi
|
fi
|
||||||
|
@ -193,6 +193,9 @@ static snd_pcm_format_t
|
|||||||
get_bitformat(enum sample_format sample_format)
|
get_bitformat(enum sample_format sample_format)
|
||||||
{
|
{
|
||||||
switch (sample_format) {
|
switch (sample_format) {
|
||||||
|
case SAMPLE_FORMAT_UNDEFINED:
|
||||||
|
return SND_PCM_FORMAT_UNKNOWN;
|
||||||
|
|
||||||
case SAMPLE_FORMAT_S8:
|
case SAMPLE_FORMAT_S8:
|
||||||
return SND_PCM_FORMAT_S8;
|
return SND_PCM_FORMAT_S8;
|
||||||
|
|
||||||
@ -209,10 +212,10 @@ get_bitformat(enum sample_format sample_format)
|
|||||||
|
|
||||||
case SAMPLE_FORMAT_S32:
|
case SAMPLE_FORMAT_S32:
|
||||||
return SND_PCM_FORMAT_S32;
|
return SND_PCM_FORMAT_S32;
|
||||||
|
|
||||||
default:
|
|
||||||
return SND_PCM_FORMAT_UNKNOWN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(false);
|
||||||
|
return SND_PCM_FORMAT_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static snd_pcm_format_t
|
static snd_pcm_format_t
|
||||||
|
@ -67,26 +67,26 @@ openal_audio_format(struct audio_format *audio_format)
|
|||||||
return AL_FORMAT_STEREO16;
|
return AL_FORMAT_STEREO16;
|
||||||
if (audio_format->channels == 1)
|
if (audio_format->channels == 1)
|
||||||
return AL_FORMAT_MONO16;
|
return AL_FORMAT_MONO16;
|
||||||
break;
|
|
||||||
|
/* fall back to mono */
|
||||||
|
audio_format->channels = 1;
|
||||||
|
return openal_audio_format(audio_format);
|
||||||
|
|
||||||
case SAMPLE_FORMAT_S8:
|
case SAMPLE_FORMAT_S8:
|
||||||
if (audio_format->channels == 2)
|
if (audio_format->channels == 2)
|
||||||
return AL_FORMAT_STEREO8;
|
return AL_FORMAT_STEREO8;
|
||||||
if (audio_format->channels == 1)
|
if (audio_format->channels == 1)
|
||||||
return AL_FORMAT_MONO8;
|
return AL_FORMAT_MONO8;
|
||||||
break;
|
|
||||||
|
/* fall back to mono */
|
||||||
|
audio_format->channels = 1;
|
||||||
|
return openal_audio_format(audio_format);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* fall back to 16 bit */
|
/* fall back to 16 bit */
|
||||||
audio_format->format = SAMPLE_FORMAT_S16;
|
audio_format->format = SAMPLE_FORMAT_S16;
|
||||||
if (audio_format->channels == 2)
|
return openal_audio_format(audio_format);
|
||||||
return AL_FORMAT_STEREO16;
|
|
||||||
if (audio_format->channels == 1)
|
|
||||||
return AL_FORMAT_MONO16;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user