Merge branch 'v0.18.x'
This commit is contained in:
commit
9270485723
6
NEWS
6
NEWS
@ -71,6 +71,12 @@ ver 0.19 (not yet released)
|
|||||||
* install systemd unit for socket activation
|
* install systemd unit for socket activation
|
||||||
* Android port
|
* Android port
|
||||||
|
|
||||||
|
ver 0.18.15 (not yet released)
|
||||||
|
* command
|
||||||
|
- list: reset used size after the list has been processed
|
||||||
|
* fix MixRamp
|
||||||
|
* work around build failure on NetBSD
|
||||||
|
|
||||||
ver 0.18.14 (2014/09/11)
|
ver 0.18.14 (2014/09/11)
|
||||||
* protocol
|
* protocol
|
||||||
- fix range parser bug on certain 32 bit architectures
|
- fix range parser bug on certain 32 bit architectures
|
||||||
|
@ -27,6 +27,7 @@ void
|
|||||||
CommandListBuilder::Reset()
|
CommandListBuilder::Reset()
|
||||||
{
|
{
|
||||||
list.clear();
|
list.clear();
|
||||||
|
size = 0;
|
||||||
mode = Mode::DISABLED;
|
mode = Mode::DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ struct notify {
|
|||||||
Cond cond;
|
Cond cond;
|
||||||
bool pending;
|
bool pending;
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(__BIONIC__)
|
#if !defined(WIN32) && !defined(__NetBSD__) && !defined(__BIONIC__)
|
||||||
constexpr
|
constexpr
|
||||||
#endif
|
#endif
|
||||||
notify():pending(false) {}
|
notify():pending(false) {}
|
||||||
|
@ -371,11 +371,20 @@ ao_filter_chunk(AudioOutput *ao, const MusicChunk *chunk)
|
|||||||
if (data.size > other_data.size)
|
if (data.size > other_data.size)
|
||||||
data.size = other_data.size;
|
data.size = other_data.size;
|
||||||
|
|
||||||
|
float mix_ratio = chunk->mix_ratio;
|
||||||
|
if (mix_ratio >= 0)
|
||||||
|
/* reverse the mix ratio (because the
|
||||||
|
arguments to pcm_mix() are reversed), but
|
||||||
|
only if the mix ratio is non-negative; a
|
||||||
|
negative mix ratio is a MixRamp special
|
||||||
|
case */
|
||||||
|
mix_ratio = 1.0 - mix_ratio;
|
||||||
|
|
||||||
void *dest = ao->cross_fade_buffer.Get(other_data.size);
|
void *dest = ao->cross_fade_buffer.Get(other_data.size);
|
||||||
memcpy(dest, other_data.data, other_data.size);
|
memcpy(dest, other_data.data, other_data.size);
|
||||||
if (!pcm_mix(ao->cross_fade_dither, dest, data.data, data.size,
|
if (!pcm_mix(ao->cross_fade_dither, dest, data.data, data.size,
|
||||||
ao->in_audio_format.format,
|
ao->in_audio_format.format,
|
||||||
1.0 - chunk->mix_ratio)) {
|
mix_ratio)) {
|
||||||
FormatError(output_domain,
|
FormatError(output_domain,
|
||||||
"Cannot cross-fade format %s",
|
"Cannot cross-fade format %s",
|
||||||
sample_format_to_string(ao->in_audio_format.format));
|
sample_format_to_string(ao->in_audio_format.format));
|
||||||
|
@ -41,10 +41,21 @@ class PosixCond {
|
|||||||
pthread_cond_t cond;
|
pthread_cond_t cond;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifndef __BIONIC__
|
#if defined(__NetBSD__) || defined(__BIONIC__)
|
||||||
constexpr
|
/* NetBSD's PTHREAD_COND_INITIALIZER is not compatible with
|
||||||
|
"constexpr" */
|
||||||
|
PosixCond() {
|
||||||
|
pthread_cond_init(&cond, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
~PosixCond() {
|
||||||
|
pthread_cond_destroy(&cond);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* optimized constexpr constructor for sane POSIX
|
||||||
|
implementations */
|
||||||
|
constexpr PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
|
||||||
#endif
|
#endif
|
||||||
PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
|
|
||||||
|
|
||||||
PosixCond(const PosixCond &other) = delete;
|
PosixCond(const PosixCond &other) = delete;
|
||||||
PosixCond &operator=(const PosixCond &other) = delete;
|
PosixCond &operator=(const PosixCond &other) = delete;
|
||||||
|
@ -41,10 +41,21 @@ class PosixMutex {
|
|||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifndef __BIONIC__
|
#if defined(__NetBSD__) || defined(__BIONIC__)
|
||||||
constexpr
|
/* NetBSD's PTHREAD_MUTEX_INITIALIZER is not compatible with
|
||||||
|
"constexpr" */
|
||||||
|
PosixMutex() {
|
||||||
|
pthread_mutex_init(&mutex, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
~PosixMutex() {
|
||||||
|
pthread_mutex_destroy(&mutex);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* optimized constexpr constructor for sane POSIX
|
||||||
|
implementations */
|
||||||
|
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
||||||
#endif
|
#endif
|
||||||
PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
|
||||||
|
|
||||||
PosixMutex(const PosixMutex &other) = delete;
|
PosixMutex(const PosixMutex &other) = delete;
|
||||||
PosixMutex &operator=(const PosixMutex &other) = delete;
|
PosixMutex &operator=(const PosixMutex &other) = delete;
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#include <cppunit/ui/text/TestRunner.h>
|
#include <cppunit/ui/text/TestRunner.h>
|
||||||
#include <cppunit/extensions/HelperMacros.h>
|
#include <cppunit/extensions/HelperMacros.h>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
static enum ack last_error = ack(-1);
|
static enum ack last_error = ack(-1);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user