Max Kellermann
756f0b8027
apple: build static library
...
Move build rules from src/output/plugins/meson.build
2020-07-02 13:49:54 +02:00
Max Kellermann
4d88bddfe2
Merge branch 'v0.21.x'
2020-07-01 23:07:57 +02:00
Max Kellermann
e606044271
apple/AudioUnit: library wrapping AudioUnit*() functions
2020-07-01 23:02:22 +02:00
Max Kellermann
bcbb3371ff
apple/AudioUnit: rename to AudioObject.hxx
2020-07-01 22:49:03 +02:00
Max Kellermann
de632882d1
output/osx: move code to FindAudioDeviceByName()
2020-07-01 22:48:12 +02:00
Max Kellermann
745e492d15
output/osx: use [[maybe_unused]]
2020-07-01 22:41:00 +02:00
Max Kellermann
c5dc615efe
output/osx: use IsDigitASCII()
2020-07-01 22:39:54 +02:00
Max Kellermann
a08d4b3d66
Merge branch 'v0.21.x'
2020-07-01 22:09:33 +02:00
Max Kellermann
beeb02025e
output/osx: use range-based for
2020-07-01 22:06:36 +02:00
Max Kellermann
cdf7062597
apple/AudioUnit: wrapper functions for AudioObject properties
2020-07-01 22:05:11 +02:00
Max Kellermann
346084da1e
apple/Throw: new helper library replacing osx_os_status_to_cstring()
2020-07-01 22:05:11 +02:00
Max Kellermann
bbceb5eb91
output/osx: silently ignore some errors in osx_output_set_device()
2020-07-01 22:05:11 +02:00
Max Kellermann
90d85319c2
apple/ErrorRef: new library wrapping CFErrorRef
2020-07-01 22:05:10 +02:00
Max Kellermann
3d03683e7d
output: use StringIsEqual()
2020-07-01 22:04:26 +02:00
Max Kellermann
d8a74802d1
apple/StringRef: new library wrapping CFStringRef
2020-07-01 22:01:53 +02:00
Max Kellermann
191919d1b1
output/osx: remove trailing newline from exception messages
2020-07-01 22:01:51 +02:00
Max Kellermann
c4efc37ad8
system/ByteOrder: move to util/
2020-07-01 17:49:57 +02:00
Max Kellermann
691b6a236e
output/osx: improve sample rate selection
...
The formula in osx_output_score_sample_rate() to detect multiples of
the source sample rate was broken: when given a 44.1 kHz input file,
it preferred 16 kHz over 48 kHz, because its `frac_portion(16)=0.75`
is smaller than `frac_portion(48)=0.91`.
That formula, introduced by commit 40a1ebee29
, looks completely
wrong. It doesn't do what the code comment pretends it does.
Instead of using that `frac_portion` to calculate a score, this patch
adds to the score only if `frac_portion` is nearly `0` or `1`. This
means that the factor is nearly integer.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/904
2020-07-01 17:38:08 +02:00
Max Kellermann
5c7243d3ad
output/osx: make several fields const
2020-07-01 17:35:39 +02:00
Max Kellermann
44cfdff39a
output/osx: make variables more local
2020-07-01 17:35:33 +02:00
Max Kellermann
5eedda691a
output/osx: make more AudioObjectPropertyAddress instances static constexpr
2020-07-01 17:35:19 +02:00
Max Kellermann
a30d5e1b6a
output/osx: make AudioObjectPropertyAddress variables static constexpr
2020-07-01 17:34:12 +02:00
Max Kellermann
8ef09a0a71
output/osx: don't use C99 designated initializers
...
Fixes `-Wpedantic`.
2020-07-01 17:34:06 +02:00
Max Kellermann
e8044663b3
output/{alsa,osx}: use ConstBuffer::empty()
2020-07-01 17:32:37 +02:00
Max Kellermann
8444c33514
output/osx: don't use variable-length arrays
2020-07-01 17:31:46 +02:00
Max Kellermann
2b7328b434
output/osx: fix coding style
2020-07-01 17:11:02 +02:00
Max Kellermann
25b5ca6435
output/plugins/meson.build: add dependency on libevent.a for ALSA
2020-07-01 15:24:52 +02:00
Shen-Ta Hsieh
93d87854e9
src/output: add wasapi output and mixer plugin
2020-05-30 22:21:03 +08:00
Max Kellermann
f20b927858
Merge branch 'v0.21.x'
2020-05-30 14:05:18 +02:00
Rosen Penev
e4dad42ca1
use std chr functions
...
The ones in std have overloads for const char/char.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-30 13:36:53 +02:00
Max Kellermann
9f5c6d29b2
output/osx: use range-based for
2020-05-28 15:59:52 +02:00
Max Kellermann
f6823cc679
output/osx: move code to FindAudioDeviceByName()
2020-05-28 15:54:57 +02:00
Max Kellermann
69c0f0fe99
apple/AudioUnit: wrapper functions for AudioObject properties
2020-05-28 15:54:57 +02:00
Max Kellermann
28a00472ff
apple/Throw: new helper library replacing osx_os_status_to_cstring()
2020-05-28 15:06:53 +02:00
Max Kellermann
8d540737b9
output/osx: silently ignore some errors in osx_output_set_device()
2020-05-28 15:06:51 +02:00
Max Kellermann
1112d779be
apple/ErrorRef: new library wrapping CFErrorRef
2020-05-28 15:06:41 +02:00
Max Kellermann
ecced0ce13
apple/StringRef: new library wrapping CFStringRef
2020-05-28 15:06:38 +02:00
Max Kellermann
2c084781b0
output/openal: disable -Wdeprecated-declarations on Apple
2020-05-28 13:59:52 +02:00
Max Kellermann
6e1a21a42a
output/osx: make several fields const
2020-05-28 13:59:32 +02:00
Max Kellermann
80e8338014
output/osx: make variables more local
2020-05-28 13:44:28 +02:00
Max Kellermann
bfaa7afcb0
output/osx: make more AudioObjectPropertyAddress instances static constexpr
2020-05-28 13:39:46 +02:00
Max Kellermann
7fdbaa6156
output/osx: make AudioObjectPropertyAddress variables static constexpr
2020-05-27 19:50:44 +02:00
Max Kellermann
aa7dc62f72
output/osx: don't use C99 designated initializers
...
Fixes `-Wpedantic`.
2020-05-27 19:50:43 +02:00
Max Kellermann
8f178401e4
*/plugins/meson.build: define feature macros in Features.h
...
This makes ccache more efficient when recompiling with different
plugins.
2020-05-05 15:06:50 +02:00
Max Kellermann
9815d10137
system/FileDescriptor: move to io/
2020-05-05 14:27:03 +02:00
nia
8437b141a4
SolarisOutputPlugin: Support S8 and S32 encodings.
2020-04-14 14:38:30 +01:00
nia
1f0881eec0
SolarisOutputPlugin: Use AUDIO_INITINFO for initialization
...
This is recommended by Solaris and NetBSD documentation.
2020-04-14 14:20:24 +01:00
Max Kellermann
ae4fd576bf
output/ao: use IterableSplitString() instead of SplitString()
2020-04-03 16:47:25 +02:00
Max Kellermann
12b97bbe38
release v0.21.22
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl6GCWgQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEvkQD/9qg6cnCgCKSOmTjteJu1ayeXBMDiL3cCCg
AwarHQoxsB0102NpV+MLka+4HIwHn+WNL55TzYgfbSh0nfmnki2fZ0YpsZoQR79w
MP11iMPnFH1oKqj58minBkFNmAis2aLYHJGKaQNUh7wcf0WhbVTqtWBUrKb07RQ0
Zj5lXtg65O/+yaCVdQGS6fMk2t7CqBM+S3RmbXCib/JRMC6aozoC7nWPvj8b2R8d
PgxwKMRzyslyFoxDQZrusDjJ1piyigzUMMr32yzYDED4Xr8jsEELaJfULbr6qWT2
ZNYF91e+D5V7riASAtlFTaVMaISx4QbHjKWR5Xcx0q/SJPAXTxF8RrAqGvqpWYmc
kqmC8iNxQsW5o3sNhI9qg6sOkq2dIu43VasRCvuo19GABR36wwTK5ORoazIi8fbU
/Ki/oZHtZczHRop9Cd6698Qr9jyTPdIs55FbgejzrVADvAmslqtcA6XxCBuG1nSF
Qo48dp9Px7J74qNNuDt5/xLnQGJKaW60/BXrMK9G9QG4x9r4zuCayDO6Qc7FMWWR
DG7k9nYoXJU5YG7xp9Rk+Yj3Ade8kqhTnKfqw0f2JfkLt0ChPG+rZcxICWSdzZm0
AfHxuEQlwKaaFHFEsZhVehlsXkeU9OVywo+QDzmY2uqQ2ddlBZ47Qm2MWgTsv8i/
euVsrzLtag==
=EedX
-----END PGP SIGNATURE-----
Merge tag 'v0.21.22'
release v0.21.22
2020-04-02 18:02:10 +02:00
Max Kellermann
e1c43ec65f
Merge branch 'ucl' of git://github.com/neheb/MPD into v0.21.x
2020-03-26 17:28:21 +01:00
Rosen Penev
608d7ec1e7
[clang-tidy] change integer prefixes to uppercase
...
Found with readability-uppercase-literal-suffix
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26 17:25:20 +01:00
Rosen Penev
85c27840a3
treewide: use boost::lround when std::round is unavailable
...
This is the case with uClibc-ng currently.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 769cd0ee9f0cf8ceb026aa751b5d4a390bb5dbdc)
(changed define to match master)
2020-03-25 18:54:15 -07:00
Thomas Guillem
81c16273c5
output/sles: use the AndroidMixerPlugin
2020-03-25 20:08:53 +01:00
Rosen Penev
01e00632cc
[cppcheck] fix format string
...
Found with invalidPrintfArgType_sint
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-25 19:27:40 +01:00
Thomas Guillem
86613af37e
output/sles: fix invalid assert
...
Regression from 973c87b351
2020-03-21 22:34:04 +01:00
Rosen Penev
d2115e908a
[clang-tidy] remove redundant access specifiers
...
Found with readability-redundant-access-specifiers
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-19 13:38:40 +01:00
Max Kellermann
fd71514068
Merge remote-tracking branch 'neheb/h'
2020-03-16 17:29:05 +01:00
Max Kellermann
256cfc545d
Merge remote-tracking branches 'neheb/fwhfggwe', 'neheb/nvm2', 'neheb/nvm22', 'neheb/bvm' and 'neheb/cl2'
2020-03-16 17:25:50 +01:00
Rosen Penev
7f10e7a610
fix implicit-fallthrough warnings under clang
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:12:38 -07:00
Rosen Penev
97425d56e7
remove gcc_unused
...
[[maybe_unused]] (introduced in C++17) is standard C++.
https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Rosen Penev
3ec9fcfc44
treewide: use boost::lround when std::round is unavailable
...
This is the case with uClibc-ng currently.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-15 20:17:31 -07:00
Rosen Penev
a2f5a63bbc
replace stdint.h with cstdint
...
The former is deprecated by C++14. The standard says they are the same:
The header defines all types and macros the same as the C standard library
header<stdint.h>.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 19:04:39 -07:00
Rosen Penev
2db8bcc353
replace stddef.h with cstddef
...
The former is deprecated with C++14. The standard says both are the same:
The contents and meaning of the header<cstddef>are the same as the C
standard library header<stddef.h>,except that it does not declare the type
wchar_t, that it also declares the type byte and its associated
operations (21.2.5), and as noted in 21.2.3 and 21.2.4.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 19:04:38 -07:00
Rosen Penev
edc4989d9c
change errno.h to cerrno
...
The former is deprecated by C++14. It's also functionally the same.
From the standard:
19.4
The header<cerrno>is described in Table 43. Its contents are the same as
the POSIX header<errno.h>,except that errno shall be defined as a macro.
[Note: The intent is to remain in close alignment with the POSIX
standard.] A separate errno value shall be provided for each thread.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:51:16 -07:00
Rosen Penev
2b3d6461e3
remove unused ctype.h header
...
None of the functions in these files come from ctype.h
Also changed one instance of isdigit to the C++ variant.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:43:50 -07:00
Rosen Penev
ab9f5d2067
replace assert.h with cassert
...
The former was deprecated with C++14.
According to the C++11 and C++17 standards, both files are identical.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Rosen Penev
f00f8b002a
[clang-tidy] use nodiscard
...
Introduced in C++17. It replaces gcc's warn_unused_result.
Found with modernize-use-nodiscard.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 12:59:16 -07:00
Max Kellermann
01632d37ef
Merge branch 'v0.21.x'
2020-03-12 08:11:08 +01:00
Thomas Klausner
7a68b1e71f
Adapt SolarisOutputPlugin.cxx to be usable on NetBSD.
2020-02-29 10:05:29 +01:00
Max Kellermann
1e421cbcb2
Merge remote-tracking branches 'neheb/patch-2', 'neheb/con', 'neheb/cons', 'neheb/guruhg', 'neheb/r12R3', 'neheb/fefgheh' and 'neheb/rhgerg3453'
2020-02-05 19:36:01 +01:00
Rosen Penev
a3963de668
[clang-tidy] change integer prefixes to uppercase
...
Found with readability-uppercase-literal-suffix
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04 15:20:50 -08:00
Rosen Penev
1923cf3844
remove redundant const qualification
...
Found with readability-const-return-type
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04 15:16:28 -08:00
Rosen Penev
568deefd68
[clang-tidy] remove pointless void arg
...
Found with modernize-redundant-void-arg
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:52:38 -08:00
Max Kellermann
bc6eca2115
*: add explicit
2020-02-01 14:02:43 +01:00
Max Kellermann
72ec641f0d
*: use auto
2020-02-01 14:02:43 +01:00
Rosen Penev
b64fdae938
[clang-tidy] use override instead of virtual
...
Found with modernize-use-override
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-01-31 21:27:26 -08:00
Max Kellermann
7551867249
meson.build: move Log.cxx and LogBackend.cxx into a static library
...
Prevents compiling those sources many times, once for each debug
program using it.
2020-01-18 19:56:16 +01:00
Max Kellermann
2817bf9e95
copyright year 2020
2020-01-18 19:23:49 +01:00
Max Kellermann
64309abc14
Merge branch 'v0.21.x'
2020-01-14 22:04:55 +01:00
Max Kellermann
af20a1c994
pulse: obey Pulse's maximum sample rate (fixes DSD128 playback)
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/708
2020-01-12 07:58:17 +01:00
Max Kellermann
683d5848f4
release v0.21.17
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl34Bg0QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEmOvD/4/gBb1kIOQduz+ZV79LHPGeqDoIJBm8VWg
t9R1Mpt0flqC8+RcXFK/P0kUifBO5fu+a1DbHHijUvDNLYpUsCiXyxTpES9gGh54
7djEeqi1suoLpMUt4zkUEHGTp2dGUTmyewE1TuF1sZi2xlPgOeWXEX7a0xWs4zdG
WI4CojUSkQGVAI2XZ7xIKP1v368B9F6AbqTK4zkzjNbTCv5VfESGlxdde0NXqU2e
/bjil1aT2kdcks3ddeT4llyGIUzn1PzOyA6LQvmVXLSAtz9Rr/hHA+qkR19a4CCt
PXxE0xClhhmZglzPuES0sRqBbwG99dPzA1ajTOtielwMrlFx+OceRfUnfdgqpPqd
HTkEzMGsQ2PMMbE8R9DF5GU8B9xAcnKMh2g3/9KGStbocGSFWahLRObkHEhC5uJu
g5ncQio3o/AtlBirywn/lkd6CYRDvMheMVOTHtv4/ZN0hIONMXCb6u1SQfqnX7qb
fRP2UP9VUpPI9MUfOn/0uqM8/zXb5SMRe78p9UIYCF+mEDST190VxsdMjiBp/Xug
Pktlec72iyiNHCavp04nXkt2kBrfSIFFaAQ0Qlp4huRV1k3Ur672NHtwuPLv8ORH
xLec8On6nWVuuu5kC0F+4KxTlu6u2CMwH+wVr7t/D4rrD1iVo39MtElTBawZZC6+
8EapnNHyGg==
=A+Dp
-----END PGP SIGNATURE-----
Merge tag 'v0.21.17'
release v0.21.17
2019-12-16 23:44:20 +01:00
Max Kellermann
13ce07d181
output/shout: declare metadata as UTF-8
...
Apparently, Icecast defaults to ISO-8859-1 for MP3:
http://icecast.org/docs/icecast-2.4.0/config-file.html#mountsettings
This change forces Icecast to UTF-8 without having to configure it in
Icecast's configuration file.
2019-11-06 16:05:22 +01:00
Max Kellermann
496f43e25d
Merge branch 'v0.21.x'
2019-11-04 15:07:46 +01:00
Niklas Haas
65778a3774
output/Jack: mark ports as terminal
...
This is the correct thing to do for ports from which a signal ultimately
"originates", such as is the case with mpd.
2019-10-29 10:07:44 +01:00
Max Kellermann
f2c3d86612
output: use StringIsEqual()
2019-09-26 14:48:31 +02:00
Max Kellermann
0643b5abad
release v0.21.15
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl2LvuAQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEg3VD/9uWiK11PPXfpAqOQgL63c1CS/6HJizwnox
n0ns3T7eJJPXy06NTwuo5M8JeAIhuysEciHlJeGBf4NIGwGGHOL3nQv3FkWJlfeh
UrIJq66gIzElZ62Jvq+7zkkfjm6A0tmQoAEoIPouus+A4RNwndpqsKSotZzLK0yY
ACkJTxl8JJj+UbLzleDKSA+RxG817onGKl+urkvNDRdD7xs3VEUX6jhddVM1n3m+
BqCaihuQZYXur45mYIwFI7H5JevRawnEX8L6tERW0cE8j5IhnnPjwYvMX+DcZoTe
DgYuGkfPTfl31QufbbetTwWITjf4nrummYrAM/fKcNJcaqZFo4hs7m7N6p9c2ebm
QCUG0On32Lvkq4/iLAxXIdoy38mPkarREB2XQebHa6j2XPFjxB01lXLGYJzPtqBu
LCFRpR+ssWeZDQ3uP+fAzlgMXmB+owWa9NVqU5vlx97TCmXInOeim6tfq1T4keGW
3VFLqM6VAw4QyhrbowU0xbvxvYkWrgpkYbM5NcfwI67xZGLsI5vnRzX05VgF6BFZ
B7g+JIWjv+Mjm1ltsvC4OlJEcCXZb0BQWvwLHq0EGeEP/R9MWYX6BxlF1V8FWR2S
bIL0qIqtZfuUI66irNn23ZCyN4DilMcZkS8f30321hB2GLputG8zZwCcjxy1a/ft
1OoHXRfKNw==
=uONC
-----END PGP SIGNATURE-----
Merge tag 'v0.21.15'
release v0.21.15
2019-09-25 21:27:31 +02:00
Max Kellermann
818b7e0641
output/solaris: include sys/stropts.h only on Solaris
...
This header had been available for a long time on Linux, but was
removed in glibc 2.30. This commit moves the `#include` line inside
the `#ifdef __sun` block and adds a fake declaration of `I_FLUSH` for
the Linux build.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/630
2019-08-22 11:41:12 +02:00
Max Kellermann
bcccc8f66c
output/jack: use jack_free() for Windows compatibility
2019-08-06 11:34:56 +02:00
Max Kellermann
848c63e2d5
output/jack: use std::atomic_bool for "shutdown" and "pause"
...
Without this, the compiler may optimize accesses away.
2019-08-06 11:34:00 +02:00
Max Kellermann
f6d0310f9c
output/jack: use SIZE_MAX instead of (size_t)-1
2019-08-06 11:33:52 +02:00
Max Kellermann
8b399b7133
output/jack: use jack_free() for Windows compatibility
2019-08-05 09:35:41 +02:00
Max Kellermann
9d24f68f51
output/jack: convert to class, make attributes/methods private
2019-08-05 09:31:40 +02:00
Max Kellermann
44652fdb13
output/jack: convert callback functions to static methods
2019-08-05 09:29:27 +02:00
Max Kellermann
2892a6f5e2
output/jack: merge set_audioformat() into Open()
2019-08-05 09:28:41 +02:00
Max Kellermann
2fc40e5575
output/jack: eliminate "shutdown" flag, use only "error" (mutex protected)
2019-08-05 09:24:43 +02:00
Max Kellermann
d146bef740
output/jack: use jack_on_info_shutdown()
2019-08-04 20:25:13 +02:00
Max Kellermann
1f4c4be1f1
output/jack: use std::atomic_bool for "shutdown" and "pause"
...
Without this, the compiler may optimize accesses away.
2019-08-04 20:24:51 +02:00
Max Kellermann
90067d16c0
output/jack: use SIZE_MAX instead of (size_t)-1
2019-08-04 06:34:43 +02:00
Max Kellermann
cde6c46d2f
util/Macros: replace with std::size() (C++17)
2019-08-03 13:10:49 +02:00
ckdo
d305f187d5
Add the ability to specify media.role for pulse output plugin
...
This is useful in multiple mpd instances scenario, or multiple pulse outputs defined on the same mpd instance.
It is actually a more flexible way to route flows than the "sink" parameter, letting the PulseAudio routing do its job, but with the ability to isolate routing for each output.
If not specified, the role remains like it was before this commit, ie "music"
2019-08-03 13:03:05 +02:00