diff options
Diffstat (limited to 'extern/audaspace')
-rw-r--r-- | extern/audaspace/plugins/pulseaudio/PulseAudioDevice.cpp | 6 | ||||
-rw-r--r-- | extern/audaspace/plugins/pulseaudio/PulseAudioSymbols.h | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/extern/audaspace/plugins/pulseaudio/PulseAudioDevice.cpp b/extern/audaspace/plugins/pulseaudio/PulseAudioDevice.cpp index 3ffe97661d8..cbfb5e96e6c 100644 --- a/extern/audaspace/plugins/pulseaudio/PulseAudioDevice.cpp +++ b/extern/audaspace/plugins/pulseaudio/PulseAudioDevice.cpp @@ -78,6 +78,7 @@ void PulseAudioDevice::runMixingThread() if(shouldStop()) { AUD_pa_stream_cork(m_stream, 1, nullptr, nullptr); + AUD_pa_stream_flush(m_stream, nullptr, nullptr); doStop(); return; } @@ -86,7 +87,10 @@ void PulseAudioDevice::runMixingThread() if(AUD_pa_stream_is_corked(m_stream)) AUD_pa_stream_cork(m_stream, 0, nullptr, nullptr); - AUD_pa_mainloop_iterate(m_mainloop, true, nullptr); + // similar to AUD_pa_mainloop_iterate(m_mainloop, false, nullptr); except with a longer timeout + AUD_pa_mainloop_prepare(m_mainloop, 1 << 14); + AUD_pa_mainloop_poll(m_mainloop); + AUD_pa_mainloop_dispatch(m_mainloop); } } diff --git a/extern/audaspace/plugins/pulseaudio/PulseAudioSymbols.h b/extern/audaspace/plugins/pulseaudio/PulseAudioSymbols.h index 4b9e1ffea2b..361aa518087 100644 --- a/extern/audaspace/plugins/pulseaudio/PulseAudioSymbols.h +++ b/extern/audaspace/plugins/pulseaudio/PulseAudioSymbols.h @@ -24,6 +24,7 @@ PULSEAUDIO_SYMBOL(pa_context_unref); PULSEAUDIO_SYMBOL(pa_stream_begin_write); PULSEAUDIO_SYMBOL(pa_stream_connect_playback); PULSEAUDIO_SYMBOL(pa_stream_cork); +PULSEAUDIO_SYMBOL(pa_stream_flush); PULSEAUDIO_SYMBOL(pa_stream_is_corked); PULSEAUDIO_SYMBOL(pa_stream_new); PULSEAUDIO_SYMBOL(pa_stream_set_buffer_attr); @@ -35,3 +36,6 @@ PULSEAUDIO_SYMBOL(pa_mainloop_free); PULSEAUDIO_SYMBOL(pa_mainloop_get_api); PULSEAUDIO_SYMBOL(pa_mainloop_new); PULSEAUDIO_SYMBOL(pa_mainloop_iterate); +PULSEAUDIO_SYMBOL(pa_mainloop_prepare); +PULSEAUDIO_SYMBOL(pa_mainloop_poll); +PULSEAUDIO_SYMBOL(pa_mainloop_dispatch); |