Skip to content

Commit 3e485ba

Browse files
committed
LibMedia: Move the PulseAudioStream constructor out of line
1 parent 2c73848 commit 3e485ba

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Libraries/LibMedia/Audio/PulseAudioWrappers.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ ErrorOr<NonnullRefPtr<PulseAudioStream>> PulseAudioContext::create_stream(Output
280280
return stream_wrapper;
281281
}
282282

283+
PulseAudioStream::PulseAudioStream(NonnullRefPtr<PulseAudioContext>&& context, pa_stream* stream)
284+
: m_context(context)
285+
, m_stream(stream)
286+
{
287+
}
288+
283289
PulseAudioStream::~PulseAudioStream()
284290
{
285291
auto locker = m_context->main_loop_locker();

Libraries/LibMedia/Audio/PulseAudioWrappers.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,7 @@ class PulseAudioStream : public AtomicRefCounted<PulseAudioStream> {
126126
private:
127127
friend class PulseAudioContext;
128128

129-
explicit PulseAudioStream(NonnullRefPtr<PulseAudioContext>&& context, pa_stream* stream)
130-
: m_context(context)
131-
, m_stream(stream)
132-
{
133-
}
129+
explicit PulseAudioStream(NonnullRefPtr<PulseAudioContext>&& context, pa_stream* stream);
134130
PulseAudioStream(PulseAudioStream const& other) = delete;
135131

136132
ErrorOr<void> wait_for_operation(pa_operation*, StringView error_message);

0 commit comments

Comments
 (0)