Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
92704857
Commit
92704857
authored
Sep 24, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.18.x'
parents
cbdaf482
e93975cb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
8 deletions
+48
-8
NEWS
NEWS
+6
-0
CommandListBuilder.cxx
src/command/CommandListBuilder.cxx
+1
-0
notify.hxx
src/notify.hxx
+1
-1
OutputThread.cxx
src/output/OutputThread.cxx
+10
-1
PosixCond.hxx
src/thread/PosixCond.hxx
+14
-3
PosixMutex.hxx
src/thread/PosixMutex.hxx
+14
-3
test_protocol.cxx
test/test_protocol.cxx
+2
-0
No files found.
NEWS
View file @
92704857
...
...
@@ -71,6 +71,12 @@ ver 0.19 (not yet released)
* install systemd unit for socket activation
* 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)
* protocol
- fix range parser bug on certain 32 bit architectures
...
...
src/command/CommandListBuilder.cxx
View file @
92704857
...
...
@@ -27,6 +27,7 @@ void
CommandListBuilder
::
Reset
()
{
list
.
clear
();
size
=
0
;
mode
=
Mode
::
DISABLED
;
}
...
...
src/notify.hxx
View file @
92704857
...
...
@@ -28,7 +28,7 @@ struct notify {
Cond
cond
;
bool
pending
;
#if !defined(WIN32) && !defined(__BIONIC__)
#if !defined(WIN32) && !defined(__
NetBSD__) && !defined(__
BIONIC__)
constexpr
#endif
notify
()
:
pending
(
false
)
{}
...
...
src/output/OutputThread.cxx
View file @
92704857
...
...
@@ -371,11 +371,20 @@ ao_filter_chunk(AudioOutput *ao, const MusicChunk *chunk)
if
(
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
);
memcpy
(
dest
,
other_data
.
data
,
other_data
.
size
);
if
(
!
pcm_mix
(
ao
->
cross_fade_dither
,
dest
,
data
.
data
,
data
.
size
,
ao
->
in_audio_format
.
format
,
1.0
-
chunk
->
mix_ratio
))
{
mix_ratio
))
{
FormatError
(
output_domain
,
"Cannot cross-fade format %s"
,
sample_format_to_string
(
ao
->
in_audio_format
.
format
));
...
...
src/thread/PosixCond.hxx
View file @
92704857
...
...
@@ -41,10 +41,21 @@ class PosixCond {
pthread_cond_t
cond
;
public
:
#ifndef __BIONIC__
constexpr
#if defined(__NetBSD__) || defined(__BIONIC__)
/* 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
PosixCond
()
:
cond
(
PTHREAD_COND_INITIALIZER
)
{}
PosixCond
(
const
PosixCond
&
other
)
=
delete
;
PosixCond
&
operator
=
(
const
PosixCond
&
other
)
=
delete
;
...
...
src/thread/PosixMutex.hxx
View file @
92704857
...
...
@@ -41,10 +41,21 @@ class PosixMutex {
pthread_mutex_t
mutex
;
public
:
#ifndef __BIONIC__
constexpr
#if defined(__NetBSD__) || defined(__BIONIC__)
/* 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
PosixMutex
()
:
mutex
(
PTHREAD_MUTEX_INITIALIZER
)
{}
PosixMutex
(
const
PosixMutex
&
other
)
=
delete
;
PosixMutex
&
operator
=
(
const
PosixMutex
&
other
)
=
delete
;
...
...
test/test_protocol.cxx
View file @
92704857
...
...
@@ -8,6 +8,8 @@
#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/extensions/HelperMacros.h>
#include <unistd.h>
static
enum
ack
last_error
=
ack
(
-
1
);
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment