Commit Graph

865 Commits

Author SHA1 Message Date
Max Kellermann 8da3f8c6a7 output/oss: oss_try_ioctl() throws on EINVAL
Eliminate some duplicate code.
2021-08-05 15:47:11 +02:00
Max Kellermann c97aabe43a Merge branch 'v0.22.x' 2021-08-05 15:17:07 +02:00
Max Kellermann 17b0ac75ca output/oss: always enable PcmExport for alsa_channel_order
We need this even when AFMT_S24_PACKED is not available, for the
correct channel order in multi-channel files.  Internally, MPD uses
FLAC channel order, but OSS uses the same channel order as ALSA.
2021-08-05 15:11:54 +02:00
Max Kellermann b77acd35f7 output/winmm: fix struct/class mismatch 2021-08-05 11:40:47 +02:00
Max Kellermann 968624035c mixer/pipewire: new plugin 2021-08-05 10:57:37 +02:00
Max Kellermann b838bf3109 output/pipewire: un-inline StateChanged() 2021-08-05 10:48:17 +02:00
Max Kellermann 4d1ce7023b output/pipewire: implement Pause() 2021-08-04 17:26:54 +02:00
Max Kellermann 52577ac87a output/pipewire: implement Cancel() properly 2021-08-04 17:24:49 +02:00
Max Kellermann 239698cb5a output/pipewire: set channel positions 2021-07-30 15:55:37 +02:00
Max Kellermann e55de6e9f0 output/pipewire: implement Drain() 2021-07-30 15:28:01 +02:00
Max Kellermann cfaf2ed03c output/pipewire: move code to CheckThrowError() 2021-07-30 15:24:20 +02:00
Max Kellermann 6015960871 output/pipewire: reset the "interrupted" flag in Cancel()
This fixes seeking.
2021-07-30 15:20:32 +02:00
Max Kellermann 26328cc915 output/pipewire: detect connection errors 2021-07-30 14:31:06 +02:00
Max Kellermann cd512f0b40 output/pipewire: replace usleep() with with pw_thread_loop_wait() 2021-07-30 14:31:04 +02:00
Max Kellermann be14dd59a8 output/pipewire: remove obsolete TODO comment 2021-07-30 13:50:55 +02:00
Max Kellermann 97e5787ff7 output/pipewire: call libpipewire only while holding the lock
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1210
2021-07-30 13:49:22 +02:00
Max Kellermann 6975d3ca4b output/pipewire: switch from pw_main_loop to pw_thread_loop
We need this for pw_thread_loop_lock().
2021-07-30 13:42:59 +02:00
Max Kellermann 5eab2d96f4 output/winmm: fix struct/class mismatch 2021-07-16 08:30:34 +02:00
Max Kellermann b29a43b4d7 decoder/mad, ...: more libfmt logging 2021-06-25 20:52:08 +02:00
Max Kellermann 6f539cfcd6 Partition, ...: use libfmt for logging 2021-06-24 21:40:11 +02:00
Max Kellermann 0185d58a2b Log: add libfmt support 2021-06-24 21:14:42 +02:00
Rosen Penev 6af7be4a45 add constexpr
Found with cppcoreguidelines-interfaces-global-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-31 13:45:39 -07:00
Rosen Penev 220d2bf026 clang-tidy: add explicit deleted constructors
Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-30 22:47:20 -07:00
Max Kellermann 4f75eb9bfe output/pipewire: remove unreachable "return" statement 2021-05-26 11:57:57 +02:00
Max Kellermann 96707c0426 Merge tag 'v0.22.7'
release v0.22.7
2021-05-19 18:43:19 +02:00
Max Kellermann bcf0fdd3a8 meson.build: define NOUSER on Windows for lighter windows.h
A few exceptions are needed for sources which include COM header
(directly or indirectly).

This fixes lots of shadow warnings, see
https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 18:02:49 +02:00
Max Kellermann a169a05e41 win32, ...: avoid including windows.h
Include the most specific header documented by MSDN instead.
2021-05-19 17:25:32 +02:00
Max Kellermann 8efa5c7641 output/wasapi: use "%lu" in log calls
"%lu" is portable - it works with both POSIX and Microsoft flavors.

Fixes a part of https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 17:10:49 +02:00
Max Kellermann a2bdac571a Merge branch 'v0.22.x' 2021-05-17 19:33:15 +02:00
Max Kellermann 0f02bbc2fe output/jack: enable on Windows
This enables the JACK output plugin on Windows, but doesn't link
against libjack64.dll, instead loads the DLL at runtime with
LoadLibrary().  This kludge avoids the extremely fragile JACK shared
memory protocol by using the system's libjack64.dll, without requiring
the same DLL at build time.
2021-04-26 21:47:20 +02:00
Max Kellermann a7ba10423d Merge branch 'v0.22.x' 2021-03-13 08:41:10 +01:00
Shen-Ta Hsieh 4bcdcca7f5 output/wasapi: use calculated new buffer instead old one 2021-03-13 08:39:56 +01:00
bitkeeper c08a8581ee Added cross-origin header to http headers of the http output.
The current http output doesn't provide a header for cross-origin support. This prevents to use the mpd http stream directly from an other webapplication due the origin from the webpage differs from then the audio stream.

The fix is to add the following header to the http response:
Access-Control-Allow-Origin: *
2021-03-10 21:27:19 +01:00
Max Kellermann 25354b9d8c Merge branch 'v0.22.x' 2021-03-10 21:06:12 +01:00
Max Kellermann 25b0194036 output/wasapi: implement Drain() 2021-03-10 21:05:48 +01:00
Max Kellermann 77fe727e69 output/wasapi: move the "is_started" flag to class WasapiOutputThread 2021-03-10 20:43:28 +01:00
Max Kellermann 73f9824ddf output/wasapi: eliminate friend declaration 2021-03-10 20:38:41 +01:00
Max Kellermann 1fe0c673bc output/wasapi: implement Cancel() properly
Calling consume_all() is illegal in the producer thread.
2021-03-10 20:38:27 +01:00
Max Kellermann 8a045207a7 output/wasapi: add field paused
Fixes bogus Delay() results at the start of playback, because Delay()
thinks the output is paused.
2021-03-10 20:09:37 +01:00
Max Kellermann fe7c5a4208 output/wasapi: initialize is_started in Open() 2021-03-10 20:07:22 +01:00
Max Kellermann 8024f7e84d output/wasapi: move the thread->Play() call right before the consumed_size check
Fixes a bogus assertion failure (which can now be removed).
2021-03-10 20:07:19 +01:00
Max Kellermann 14f0134097 output/wasapi: make device_config const 2021-03-10 20:05:14 +01:00
Max Kellermann 1da27be84d output/wasapi: move runtime fields below configuration fields 2021-03-10 20:00:08 +01:00
Max Kellermann 08135f2cb7 output/wasapi: make configuration fields const 2021-03-10 19:58:33 +01:00
Max Kellermann 5907656bbb output/wasapi: stop the IAudioClient while paused
Instead of generating silence, do nothing, don't waste CPU time.
2021-03-10 17:48:49 +01:00
Max Kellermann 2ac2bd26f8 output/wasapi: combine two if statements to one switch 2021-03-10 17:45:54 +01:00
Max Kellermann a2be91aea5 output/wasapi: add method WasapiOutputThread::InterruptWaiter() 2021-03-10 17:42:26 +01:00
Max Kellermann 579428172e output/wasapi: remove the broken Delay() calculation code
This code is complicated - and broken: the producer thread is not
allowed to call consumer methods.  Also the code is not necessary
because this plugin implements Interrupt().
2021-03-10 17:39:07 +01:00
Max Kellermann 3e484637f9 output/wasapi: rename OpenDevice() to ChooseDevice()
OpenDevice was a confusing name because it does not actually open a
device.
2021-03-10 17:34:10 +01:00
Max Kellermann 3e93c392d7 output/wasapi: make enumerator a local variable 2021-03-10 17:23:41 +01:00