Commit Graph

11091 Commits

Author SHA1 Message Date
Max Kellermann
edb44a536a util/PrintException: new utility class 2018-07-17 21:58:07 +02:00
Max Kellermann
eeaaea802a config/Data: FindBlock() throws on error 2018-07-17 21:18:18 +02:00
Max Kellermann
15c36baefd config/Data: add method FindBlock() 2018-07-17 21:16:20 +02:00
Max Kellermann
33deb84aa1 config/Data: make getters const 2018-07-17 21:16:11 +02:00
Max Kellermann
b211d31a64 config/Data: add getter methods 2018-07-17 21:11:52 +02:00
Max Kellermann
5b192beaa5 config/Global: remove ConfigBlock::SetUsed() call, let caller do that
This fixes an old bug which caused the "unused" warnings to be
unreliable; only the first block in the list was marked as being
"used", no matter if it was really used, and the rest was never marked
as "used", suppressing all warnings for them.
2018-07-17 21:08:41 +02:00
Max Kellermann
ef38330d74 config/Block: add method SetUsed() 2018-07-17 21:06:15 +02:00
Max Kellermann
987b60ae73 config/Block: make "used" mutable 2018-07-17 21:05:55 +02:00
Max Kellermann
7db0f7c4da config/Param: remove unused "used" flag 2018-07-17 20:44:07 +02:00
Max Kellermann
a4eeaff63f config/File: move duplicate code to ExpectValueAndEnd() 2018-07-17 20:28:50 +02:00
Max Kellermann
7807ddae57 config/Param: allow moving the value 2018-07-17 20:27:52 +02:00
Max Kellermann
566af6827e config/Param: inline the constructor 2018-07-17 20:27:49 +02:00
Max Kellermann
bf046d895e config/Param: use C++11 initializers 2018-07-17 20:27:47 +02:00
Max Kellermann
af33a9f4b8 config/Block: allow moving name and value 2018-07-17 20:27:46 +02:00
Max Kellermann
e9a4570891 config/Block: use C++11 initializers 2018-07-17 20:16:19 +02:00
Max Kellermann
99d5b61698 fs/Path: add operator/(Path,Path)
Modeled after std::filesystem::operator/() from C++17.
2018-07-17 18:33:32 +02:00
Max Kellermann
79e89eb23b CommandLine: use constexpr Path instead of macros 2018-07-17 17:02:49 +02:00
Max Kellermann
d13a64455c config/File: use nested exception to annotate file name and line number 2018-07-16 20:00:29 +02:00
Max Kellermann
816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann
bf5f12a51f Merge branch 'patch-4' of git://github.com/Wang-Yue/MPD 2018-07-16 18:59:17 +02:00
Yue Wang
866821765a
use uint_least32_t instead of long for timeout 2018-07-16 09:42:04 -07:00
Max Kellermann
c457d8e442 Merge branch 'can' of git://github.com/Wang-Yue/MPD 2018-07-16 18:14:04 +02:00
Yue Wang
c58dffa685 Implement Cancel() for OSXOutputPlugin 2018-07-16 09:06:07 -07:00
Max Kellermann
ba41690063 output/Interface: add method ChangeAudioFormat()
This is just the API design; there is no implementation yet, and no
caller.
2018-07-16 11:46:33 +02:00
Max Kellermann
86a37d0ed6 Main, pcm/SampleFormat, command/Error: remove obsolete GCC version checks 2018-07-16 11:04:05 +02:00
Max Kellermann
2fb5dbe62b output/alsa: use spsc_queue::reset()
This method was added in Boost 1.58.
2018-07-16 11:04:01 +02:00
Max Kellermann
9c6b52ccee Permission: add special permissions for local sockets
Closes #296
2018-07-15 22:27:35 +02:00
Yue Wang
79937c9495
Support timed_wait in microseconds level
Some Audio plugin (such as ALSA, and soon CoreAudio) already support microsecond level buffer time. However, current interval less than 1000 microseconds will cause a bug that the code treated as 0 ms.
2018-07-15 13:22:53 -07:00
Max Kellermann
8aa2c57413 client: pass permission mask to constructor
Prepare for per-listener permissions.
2018-07-15 21:51:33 +02:00
Max Kellermann
524a7f4560 Listen: simplify code flow in listen_global_init() 2018-07-15 21:35:35 +02:00
Max Kellermann
56bfff5a57 event/ServerSocket: add method IsEmpty() 2018-07-15 21:35:35 +02:00
Yue Wang
1d30df9b15
Update OSXOutputPlugin.cxx
some device seems to have issue with setting kAudioDevicePropertyVolumeScalar  with kAudioObjectPropertyElementMaster. Use AudioToolbox 's kAudioHardwareServiceDeviceProperty_VirtualMasterVolume instead. 

Ideally, we should get the steoro channels first, and set the kAudioDevicePropertyVolumeScalar for each channel, which is doable as presented in https://github.com/cmus/cmus/blob/master/op/coreaudio.c. I will do a follow up PR after refactor PR.
2018-07-13 22:27:24 -07:00
Yue Wang
ef84e5c8fa
further guard dop code by if (dop_enabled) 2018-07-13 16:36:29 -07:00
Yue Wang
6d2a30b860
Update OSXOutputPlugin.cxx
1 sec for pause is too long. we wait for the same amount of time as when ring buffer is not available for writing.
2018-07-13 16:14:59 -07:00
Yue Wang
9e0fa8e9ec
Fix a copy and paste from diff bug. 2018-07-13 15:53:51 -07:00
Yue Wang
5e8e038811
Enclose pcm_export into the ENABLE_DSD guard. 2018-07-13 15:31:48 -07:00
Yue Wang
e61a804b80
Simplify audio format assignment code 2018-07-13 15:09:11 -07:00
Yue Wang
40a1ebee29
Enable OSX output plugin to set hardware sample rate and bit depth at the same time
This PR will fix #271.

special thanks to @coroner21 who contributed a nice way to score hardware supported format in #292

Also, The DSD related code are all guarded with ENABLE_DSD  flag.
2018-07-13 12:48:43 -07:00
Max Kellermann
d4ce9c0df2 system/FileDescriptor: no-op implementation of *CloseOnExec() on Windows
Fixes the NFS client build, closes #305.
2018-07-13 18:16:39 +02:00
Yue Wang
680fdb0338
enable macOS to use Hardware Mixer
- Update the mixer to set on device property instead of audio unit property. When user choose "hardware" as mixer type, they will be able to change the hardware device volume instead of the software (AudioUnit) volume. 
- We don't use square root scale in volume calculation as previous code did. This will make the volume level in line with system volume meter --- That is, MPD will have the same percentage volume reading compared to System Setting (Either in "System Preference" or in "Audio Midi Setup" app)
2018-07-10 15:51:32 -07:00
Max Kellermann
727078f65d decoder/flac: call TagHandler::OnAudioFormat() 2018-07-07 14:43:21 +02:00
Max Kellermann
d7f770ce73 decoder/flac: move flac_sample_format() to FlacAudioFormat.hxx 2018-07-07 14:40:02 +02:00
Max Kellermann
e1ddb63054 lib/xiph/FlacStreamMetadata: move code to Scan(FLAC__StreamMetadata_StreamInfo) 2018-07-07 14:33:53 +02:00
Max Kellermann
24b14c5aa5 decoder/flac: rename FlacMetadata.cxx to FlacStreamMetadata.cxx 2018-07-07 14:29:49 +02:00
Max Kellermann
2e116c9e28 lib/xiph/FlacMetadataChain: un-inline Read(InputStream) 2018-07-07 14:22:22 +02:00
Max Kellermann
37897d1550 decoder/flac: move class FlacMetadataChain to separate source 2018-07-07 14:18:00 +02:00
Max Kellermann
b153591790 decoder/flac: move FlacIOHandle.?xx to lib/xiph/ 2018-07-07 14:17:03 +02:00
Max Kellermann
ee5653338d decoder/flac: fix comment typo 2018-07-07 14:11:28 +02:00
Max Kellermann
032f47c0b0 lib/xiph/FlacMetadataIterator: disallow copying 2018-07-07 14:08:41 +02:00
Max Kellermann
1f4e4dd9b3 lib/xiph/FlacMetadataIterator: reuse default constructor 2018-07-07 14:08:18 +02:00