1. 19 Nov, 2018 1 commit
    • Max Kellermann's avatar
      check.h: remove obsolete header · ce49d99c
      Max Kellermann authored
      Since we switched from autotools to Meson in commit
      94592c14, we don't need to include
      `config.h` early to properly enable large file support.  Meson passes
      the required macros on the compiler command line instead of defining
      them in `config.h`.
      
      This means we can include `config.h` at any time, whenever we want to
      check its macros, and there are no ordering constraints.
      ce49d99c
  2. 16 Nov, 2018 1 commit
    • Max Kellermann's avatar
      output/alsa: don't call snd_pcm_drain() if nothing was written · 4cdcaa86
      Max Kellermann authored
      Works around a problem where MPD goes into a busy loop because
      snd_pcm_drain() always returns `-EAGAIN` without making any progress
      (fixes #425).
      
      This problem was triggered by snd_pcm_drain() after snd_pcm_cancel()
      and snd_pcm_prepare(), but without submitting any data with
      snd_pcm_writei().
      
      I believe this is a kernel bug: in non-blocking mode, the kernel's
      snd_pcm_drain() function returns early.  In this mode, it only checks
      whether snd_pcm_drain_done() has been called already, but
      snd_pcm_drain_done() is never called if no data was submitted.
      
      In blocking mode, the following `for` loop detects this condition, so
      snd_pcm_drain_done() is not necessary, but without this extra check,
      we get `-EAGAIN` forever.
      4cdcaa86
  3. 14 Nov, 2018 12 commits
  4. 11 Nov, 2018 2 commits
  5. 08 Nov, 2018 1 commit
    • Max Kellermann's avatar
      output/httpd: fix nullptr dereference crash bug · 583208db
      Max Kellermann authored
      When `metadata_sent` is `false`, the plugin assumes there is metadata
      which must be sent, even if no metadata page was passed to the plugin.
      Initializing it to `true` avoids dereferencing this `nullptr`.
      
      Fixes #412
      583208db
  6. 31 Oct, 2018 2 commits
    • Max Kellermann's avatar
      *: copyright year 2018 · f5c90714
      Max Kellermann authored
      f5c90714
    • Max Kellermann's avatar
      output/roar: remove · 06ca08ce
      Max Kellermann authored
      Bugs in libroar which broke the MPD build have been annoying me for
      quite some time, and the newest bug has now hit my main build machine:
      
       https://github.com/MusicPlayerDaemon/MPD/issues/377
      
      Problem is the usage of the typedef `_IO_off64_t` in libroar's
      `vio_stdio.h`:
      
       int roar_vio_to_stdio_lseek (void *__cookie, _IO_off64_t *__pos, int __w);
      
      This `_IO_off64_t` is an internal implementation detail of glibc and
      was removed in version 2.28.  Nobody must ever use it.  Why the ****
      did the RoarAudio developers use it?  Not using internal typedefs
      isn't exactly rocket science.
      
      This annoys me enough to finally remove the plugin.  Anyway, I've
      never heard of anybody using RoarAudio, so my best guess is that
      nobody will notice.
      06ca08ce
  7. 30 Oct, 2018 1 commit
  8. 14 Oct, 2018 1 commit
    • Max Kellermann's avatar
      build with Meson instead of autotools · 94592c14
      Max Kellermann authored
      So long, autotools!  This is my last MPD related project to migrate
      away from it.  It has its strengths, but also very obvious weaknesses
      and weirdnesses.  Today, many of its quirks are not needed anymore,
      and are cumbersome and slow.  Now welcome our new Meson overlords!
      94592c14
  9. 22 Sep, 2018 1 commit
  10. 20 Aug, 2018 1 commit
  11. 07 Aug, 2018 2 commits
    • 1848's avatar
      Added unix socket support in HttpdOutputPlugin · 0c1a899f
      1848 authored
      0c1a899f
    • Yue Wang's avatar
      Fix various bugs in OS X DSD playback · 2127a482
      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.
      2127a482
  12. 28 Jul, 2018 1 commit
  13. 16 Jul, 2018 3 commits
  14. 14 Jul, 2018 1 commit
    • Yue Wang's avatar
      Update OSXOutputPlugin.cxx · 1d30df9b
      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.
      1d30df9b
  15. 13 Jul, 2018 6 commits
  16. 10 Jul, 2018 1 commit
    • Yue Wang's avatar
      enable macOS to use Hardware Mixer · 680fdb03
      Yue Wang authored
      - 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)
      680fdb03
  17. 06 Jul, 2018 2 commits
    • Max Kellermann's avatar
      AudioFormat: include cleanup · 6f3c0d0a
      Max Kellermann authored
      6f3c0d0a
    • Max Kellermann's avatar
      output/httpd: remove broken DLNA support code · 5f082a27
      Max Kellermann authored
      This code was added in 21851c06 but
      looks completely broken:
      
      - the status code is "206 OK" but "206" would be "Partial Content"
      
      - the "Content-Length" header has a bogus value
      
      - the "Content-RangeX" parameter has different bogus values (why
        "Content-RangeX" anyway and not "Content-Range"?)
      
      Apart from that, there are strange undocumented non-standard headers
      which are probably there to work around bugs/expectations in one
      broken proprietary client product.  But these days, MPD doesn't bend
      over to support broken clients.  So let's kill this code.
      
      Closes #304
      5f082a27
  18. 02 Jun, 2018 1 commit