Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorJörg Müller <nexyon@gmail.com>2021-07-01 15:24:54 +0300
committerJörg Müller <nexyon@gmail.com>2021-07-01 15:26:13 +0300
commita112adf16a061b44297ec4f9dbb173be03891f5b (patch)
tree2ef281751b5f5d7db8556bcafaa76854b4723471 /extern
parent19d19970e4fa6a738010dfeb2b08886f4a3dd0d5 (diff)
Audaspace: porting pulseaudio fixes from upstream.
Diffstat (limited to 'extern')
-rw-r--r--extern/audaspace/plugins/pulseaudio/PulseAudioDevice.cpp6
-rw-r--r--extern/audaspace/plugins/pulseaudio/PulseAudioSymbols.h4
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);