diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2021-06-03 10:09:18 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2021-06-03 10:10:10 +0200 |
commit | 958d79828b1997fc040ebd1a3e5b63650a54193b (patch) | |
tree | f329aad29ec9c70e99446f462cd385f314dcf997 /drivers | |
parent | f164c00a94793234879dc1824bd657db6df939ec (diff) |
Fix crash when using ALSA MIDI with PulseAudio
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pulseaudio/audio_driver_pulseaudio.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index 0f8f2260f2..5e2431d44e 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -35,6 +35,10 @@ #include "core/config/project_settings.h" #include "core/os/os.h" +#ifdef ALSAMIDI_ENABLED +#include "drivers/alsa/asound-so_wrap.h" +#endif + void AudioDriverPulseAudio::pa_state_cb(pa_context *c, void *userdata) { AudioDriverPulseAudio *ad = (AudioDriverPulseAudio *)userdata; @@ -272,6 +276,10 @@ Error AudioDriverPulseAudio::init() { #else int dylibloader_verbose = 0; #endif +#ifdef ALSAMIDI_ENABLED + // If using PulseAudio with ALSA MIDI, we need to initialize ALSA as well + initialize_asound(dylibloader_verbose); +#endif if (initialize_pulse(dylibloader_verbose)) { return ERR_CANT_OPEN; } |