diff options
author | Max Kellermann <max@musicpd.org> | 2021-04-07 17:29:58 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-04-26 21:47:20 +0200 |
commit | 0f02bbc2fe4fa5e359dd3da7bb6fe9e87e96a98b (patch) | |
tree | 824508159b1c1736659d84d1304db9cb6f678a68 /src/output | |
parent | b885f358a51d1ea6b126372a3d122b26c19dbe46 (diff) |
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.
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/plugins/JackOutputPlugin.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/output/plugins/JackOutputPlugin.cxx b/src/output/plugins/JackOutputPlugin.cxx index 5f58f93f1..b0cb910d6 100644 --- a/src/output/plugins/JackOutputPlugin.cxx +++ b/src/output/plugins/JackOutputPlugin.cxx @@ -44,6 +44,10 @@ static constexpr unsigned MAX_PORTS = 16; static constexpr size_t jack_sample_size = sizeof(jack_default_audio_sample_t); +#ifdef DYNAMIC_JACK +#include "lib/jack/Dynamic.hxx" +#endif // _WIN32 + class JackOutput final : public AudioOutput { /** * libjack options passed to jack_client_open(). @@ -463,6 +467,10 @@ JackOutput::Disable() noexcept static AudioOutput * mpd_jack_init(EventLoop &, const ConfigBlock &block) { +#ifdef DYNAMIC_JACK + LoadJackLibrary(); +#endif + jack_set_error_function(mpd_jack_error); #ifdef HAVE_JACK_SET_INFO_FUNCTION |