Max Kellermann
2e182e84c3
thread/Mutex: remove ScopeLock, use std::lock_guard directly
2017-01-03 07:11:57 +01:00
Max Kellermann
6c818bb37a
AudioFormat: add method WithMask(), shortcut for ApplyMask()
2016-12-13 20:57:46 +01:00
Max Kellermann
99659e4cf9
release v0.19.21
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlhPxTwQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEoR8EACnEBj1zPTiraIoDZi9ZyqvwHZWILdcHRID
8XdUWmgIAwbL83Fwzxfokl060TWa43DWTWtGvieWkMcaAaTYNf8wxH6KZFmEVPCe
cvveFM6/PXJuEED16QjGoII9OzlIH330C4mmcmsfLPrcbAfULx7OtF7neIfbgpPX
ZKgrO6HVbpsMH57+o1CnX6sZXHwW9EvUy0j4YRuSfGX/7pgItfBrypDqPJCv2Hy1
mDy6gKWr7psA5ZiwYfTWVU1SPBuJiaKEM2jU80A5XVN0eZOi1EtUeySpyQO8Uncu
hnJApi9Pd6IT9Tb4Wz7LshmqHCjG82KC+EppI4ESrqE3R/OEsho1iPFej4SdJycV
XIcIRJ/S2JeopgGo4k/vlVzf4Y/9CMZZ7nP4fG1/1yjIYFQbefJeo1Gp/8b5ZTRD
5PjFgNGFyClwXNsHesF/2wDlCs1/DTv51BnapVLKD6AO9uyAOrzxBSeg8qSuprXx
K5m/z2dMdUNjBDzrSBzxKtVBwPfuARuo4Q633AxBk5C+HRpSdirtgrDBgE2aTDfU
4o+BjrhiL60t1C5iQJ48ahzCIRkEfe0czmfeNxu5Jiig8Y9cYtkYJezniyBIGkbL
RpqPxnD0YFTzzvuP8dWP+3zarxelETDwnH8KxD5jLpy2Rf2qjoNbeJNd70N6e8nN
z7Hnvp4YwQ==
=qsCR
-----END PGP SIGNATURE-----
Merge tag 'v0.19.21'
release v0.19.21
2016-12-13 11:00:39 +01:00
Max Kellermann
7146f825b2
decoder/ffmpeg: fix double free bug
...
From the avformat_open_input() API documentation:
"Note that a user-supplied AVFormatContext will be freed on failure."
https://bugs.musicpd.org/view.php?id=4607
2016-12-13 08:34:05 +01:00
Max Kellermann
57dd344f3b
decoder/wavpack: implement WavpackStreamReader64 if available
2016-12-10 00:24:54 +01:00
Max Kellermann
f7f59df8aa
decoder/wavpack: move code to WavpackInput methods
2016-12-10 00:17:46 +01:00
Max Kellermann
0525a6f90f
decoder/wavpack: use WavpackSeekSample64() if available
2016-12-10 00:12:47 +01:00
Max Kellermann
7b4305d81b
decoder/wavpack: seek errors are fatal
...
The libWavPack documentation says:
"After a FALSE return the file should not be accessed again (other
than to close it); this is a fatal error."
2016-12-10 00:11:29 +01:00
Max Kellermann
30bd190b41
decoder/wavpack: implement scan_stream()
2016-12-09 23:23:35 +01:00
Max Kellermann
cf93cd9307
decoder/wavpack: convert WavpackInput::client to pointer
2016-12-09 23:23:02 +01:00
Max Kellermann
f40816e063
decoder/wavpack: add WavpackOpen() wrappers which throw exception
2016-12-09 23:15:40 +01:00
Max Kellermann
3759f29852
decoder/wavpack: move wavpack_scan_file() down
2016-12-09 23:15:06 +01:00
Max Kellermann
bc5555933f
decoder/wavpack: support native DSD
2016-12-09 23:08:54 +01:00
Max Kellermann
ead7ae8504
decoder/wavpack: use template for format_sample_X()
2016-12-09 22:53:01 +01:00
Max Kellermann
ad5abba8c6
decoder/wavpack: move 8 and 16 bit conversion to separate functions
2016-12-09 22:49:07 +01:00
Max Kellermann
61296cedd2
decoder/wavpack: rename format_samples_float() to format_samples_nop()
2016-12-09 22:47:32 +01:00
Max Kellermann
d9c29a2c4f
decoder/wavpack: use std::copy_n()
2016-12-09 22:23:19 +01:00
Max Kellermann
f5172e6b84
decoder/wavpack: use int16_t instead of uint16_t
...
Technically, these samples are signed. There was no practical
difference, only the declaration was formally wrong.
2016-12-09 22:21:31 +01:00
Max Kellermann
544bcbe903
decoder/wavpack: use WavpackGetNumSamples64() if available
2016-12-09 22:09:32 +01:00
Max Kellermann
f35dab1b56
decoder/wavpack: check WavpackGetNumSamples()==-1
2016-12-09 21:46:29 +01:00
Max Kellermann
caee420087
decoder/wavpack: move code to GetDuration()
2016-12-09 21:45:22 +01:00
Max Kellermann
e8c374113e
decoder/wavpack: make is_float const
2016-12-09 21:30:31 +01:00
Max Kellermann
98a241a730
decoder/wavpack: use WavpackGetReducedChannels()
...
Since we don't use OPEN_2CH_MAX, this should be equal to
WavpackGetNumChannels() - but who knows, maybe a future libWavPack
version breaks this assumption.
2016-12-09 21:23:38 +01:00
Max Kellermann
be8297d6f6
decoder/wavpack: basic DSD support (WavPack 5)
...
Enable OPEN_DSD_AS_PCM if available. No OPEN_DSD_NATIVE yet.
https://bugs.musicpd.org/view.php?id=4606
2016-12-09 21:03:47 +01:00
Max Kellermann
df4ecf63a8
decoder/wavpack: disable OPEN_TAGS
...
Use MPD's internal APE tag code, which works just as well. This
removes some duplicate code for reading tags and ReplayGain.
2016-12-09 20:53:54 +01:00
Max Kellermann
b4d1937857
decoder/wavpack: change norm_offset to 0
...
MPD uses a floating point range from -1 to +1 internally - why ask
libwavpack to use -32768..+32768 only to reduce it back to -1..+1
afterwards?
2016-12-09 20:53:45 +01:00
Max Kellermann
0be5fbdc35
decoder/wavpack: use AtScopeExit()
2016-12-09 20:53:04 +01:00
Max Kellermann
c6e1ca1c22
system/Error: use std::generic_category() for errno on Windows
...
It's wrong to use std::system_category() for both GetLastError() and
errno on Windows. Apparently, everybody uses std::generic_category()
for errno values, which appears to be a safe choice.
Some discussion on this confusing topic can be found here:
https://stackoverflow.com/questions/28746372/system-error-categories-and-standard-system-error-codes
2016-12-04 20:07:11 +01:00
Max Kellermann
b3723274f7
decoder/Bridge: move code to DecoderControl::SetReady()
2016-12-03 14:20:51 +01:00
Max Kellermann
9fb7cc796b
decoder/Control: add attribute configured_audio_format
...
Obsoletes the same variable from AudioConfig.cxx.
2016-12-03 14:12:08 +01:00
Max Kellermann
6cc1ff5eeb
decoder/Control: make ReplayGainConfig const
2016-12-03 13:05:25 +01:00
Max Kellermann
86e8b8c10d
decoder/Thread: skip the ReplayGain loader if the feature is disabled
...
https://bugs.musicpd.org/view.php?id=4595
2016-11-25 13:26:40 +01:00
Max Kellermann
ee57c3490a
{decoder,player}/Control: add ReplayGain{Config,Mode} attributes
...
Don't use the global variables in class DecoderBridge; instead,
forward these values to the decoder thread via PlayerControl and
DecoderControl.
2016-11-25 12:51:55 +01:00
Max Kellermann
77c1f54876
ReplayGainConfig: add struct ReplayGainConfig, move globals to ReplayGainGlobal.cxx
2016-11-25 11:13:08 +01:00
Max Kellermann
5f396e824f
ReplayGainMode: convert to strictly-typed enum
2016-11-24 17:34:57 +01:00
Max Kellermann
25e58df5e0
ReplayGainInfo: don't use array in struct ReplayGainInfo
...
Declare two named elements. An enum should not be used as an array
index, as this is error prone.
2016-11-24 17:34:57 +01:00
Max Kellermann
09c3cc58e4
ReplayGainInfo: add method Get()
2016-11-24 17:34:57 +01:00
Max Kellermann
9b9144f25d
decoder/Control: use C++11 initializers
2016-11-24 14:58:17 +01:00
Max Kellermann
b677e891b4
decoder/{mikmod,modplug}: throw exception instead of calling FatalError()
2016-11-24 14:09:58 +01:00
Max Kellermann
95e2bec215
decoder/DecoderPlugin: container_scan() returns forward_list<DetachedSong>
...
Speed up container_scan() again, by eliminating the need to call
scan_file() for each item.
2016-11-22 16:49:31 +01:00
Max Kellermann
72c96052b4
decoder/gme: move gme_container_scan() down
2016-11-22 16:49:30 +01:00
Max Kellermann
bf78b7f815
decoder/sidplay: use template to eliminate duplicate code
2016-11-22 13:17:31 +01:00
Max Kellermann
ffb9874d84
decoder/sidplay: move code to ScanSidTuneInfo()
2016-11-22 12:37:25 +01:00
Max Kellermann
228cdbe6af
decoder/gme: provide the TRACK tag
2016-11-22 12:20:31 +01:00
Max Kellermann
a303639c9e
decoder/{gme,sidplay}: fix off-by-one bug in container_scan()
...
Broken by commit 0abee77e62
2016-11-22 12:20:31 +01:00
Max Kellermann
c5133f6088
db/update/Container: catch C++ exceptions
2016-11-22 12:16:14 +01:00
Max Kellermann
27d368d48d
decoder/gme: use AtScopeExit()
2016-11-22 12:16:14 +01:00
Max Kellermann
085b599f84
decoder/gme: remove redundant extern declaration
2016-11-22 12:16:14 +01:00
Max Kellermann
3b84eb3b70
decoder/gme: add missing SUBTUNE_PREFIX
...
Got lost in 0abee77e62
2016-11-22 12:16:14 +01:00
Max Kellermann
aa877a29d7
decoder/Thread: repair container decoder support
...
Catch ENOTDIR exceptions and in that case, try all matching decoder
plugins which implement the "container_scan" method.
https://bugs.musicpd.org/view.php?id=4561
2016-11-22 10:24:08 +01:00