Commit c4c64854 authored by Max Kellermann's avatar Max Kellermann

output/pipewire: evaluate errno after libpipewire function calls

parent 17562dc9
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "../Error.hxx" #include "../Error.hxx"
#include "mixer/plugins/PipeWireMixerPlugin.hxx" #include "mixer/plugins/PipeWireMixerPlugin.hxx"
#include "pcm/Silence.hxx" #include "pcm/Silence.hxx"
#include "system/Error.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/ScopeExit.hxx" #include "util/ScopeExit.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
...@@ -295,7 +296,7 @@ PipeWireOutput::Enable() ...@@ -295,7 +296,7 @@ PipeWireOutput::Enable()
{ {
thread_loop = pw_thread_loop_new(name, nullptr); thread_loop = pw_thread_loop_new(name, nullptr);
if (thread_loop == nullptr) if (thread_loop == nullptr)
throw std::runtime_error("pw_thread_loop_new() failed"); throw MakeErrno("pw_thread_loop_new() failed");
pw_thread_loop_start(thread_loop); pw_thread_loop_start(thread_loop);
} }
...@@ -465,7 +466,7 @@ PipeWireOutput::Open(AudioFormat &audio_format) ...@@ -465,7 +466,7 @@ PipeWireOutput::Open(AudioFormat &audio_format)
&stream_events, &stream_events,
this); this);
if (stream == nullptr) if (stream == nullptr)
throw std::runtime_error("pw_stream_new_simple() failed"); throw MakeErrno("pw_stream_new_simple() failed");
auto raw = ToPipeWireAudioFormat(audio_format); auto raw = ToPipeWireAudioFormat(audio_format);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment