- 14 Aug, 2020 1 commit
-
-
Max Kellermann authored
Our AudioObjectGetPropertyDataT() wrapper throws exception on error, and calling it from OSXOutput::Disable() can cause MPD crash due to std::terminate(). Closes https://github.com/MusicPlayerDaemon/MPD/issues/932
-
- 02 Jul, 2020 10 commits
-
-
Max Kellermann authored
Wait until there is data in the ring buffer.
-
Max Kellermann authored
-
Max Kellermann authored
Wait until there is some data; don't let our render callback be invoked without any data.
-
Max Kellermann authored
We shouldn't restart the AudioUnit while the ring buffer is empty, or else our render callback may emit noise. Closes https://github.com/MusicPlayerDaemon/MPD/issues/771
-
Max Kellermann authored
-
Max Kellermann authored
This will keep track of AudioOutputUnitStart() and AudioOutputUnitStop(). This will provide some separation between "not (yet) (re)started" and "paused".
-
Max Kellermann authored
This shall be done by Close(), which will be called automatically after an error.
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
- 01 Jul, 2020 23 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
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 40a1ebee, 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
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
Fixes `-Wpedantic`.
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
- 26 Jan, 2019 1 commit
-
-
Yue Wang authored
Currently it falls back to system default device (either internal speaker or headphone) when device not found. I believe it is a better to fail in this case, to make it better aligned with platforms (such as alsa).
-
- 31 Oct, 2018 1 commit
-
-
Max Kellermann authored
-
- 07 Aug, 2018 1 commit
-
-
Yue Wang authored
the most notable bugs are 1. osx_output_set_device_format should use the target asbd rather than AudioFormat. This is because asbd's sample rate calculation reflects the real dop target rate of the DAC, white AudioFormat's sample rate is the original DSD format rate. 2. the original code value the highest rate that's the multiple of the target rate. This cause DOP always have the wrong rate chosen. This is also not necessary for PCM playback --- MPD's goal is bit perfect, and it's meaningless to raise to two or four times the PCM sample rate. 3. if sample_rate cannot be synchronized, the test for falling back to PCM is wrong. If the file format is in DSD format such fallback is necessary, whatever the params.dop setting is.
-
- 28 Jul, 2018 1 commit
-
-
Yue Wang authored
the code here tried to guard DSD features behind ENABLE_DSD. However, the sample rate setting should be shared between two scenarios. https://github.com/MusicPlayerDaemon/MPD/commit/40a1ebee295c569521ea17ffdedc641d1aedd9cb#diff-ce7ecec9ea9ca3df90d9c290cb3ef9d4R795 The code runs fine if the dac supports the sample rate, as Mac OS will use the device rate if stream rate is 0. However, when DAC is uncapable of processing the sample rate, a wrong rate (device rate) will be used for the stream rate.
-
- 16 Jul, 2018 1 commit
-
-
Yue Wang authored
-
- 14 Jul, 2018 1 commit
-
-
Yue Wang authored
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.
-