LibMedia: Rename PulseAudioContext::instance() to the()

This commit is contained in:
Zaggy1024
2025-10-24 13:02:32 -05:00
committed by Gregory Bertilson
parent c0939725a2
commit b8bc129a3c
Notes: github-actions[bot] 2025-11-24 21:11:04 +00:00
3 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ ErrorOr<NonnullRefPtr<PlaybackStream>> PlaybackStreamPulseAudio::create(OutputSt
// Create the control thread and start it.
auto thread = TRY(Threading::Thread::try_create([=, data_request_callback = move(data_request_callback)]() mutable {
auto context = TRY_OR_EXIT_THREAD(PulseAudioContext::instance());
auto context = TRY_OR_EXIT_THREAD(PulseAudioContext::the());
internal_state->set_stream(TRY_OR_EXIT_THREAD(context->create_stream(initial_state, sample_rate, channels, target_latency_ms, [data_request_callback = move(data_request_callback)](PulseAudioStream&, Bytes buffer, size_t sample_count) {
return data_request_callback(buffer, PcmSampleFormat::Float32, sample_count);
})));

View File

@@ -18,7 +18,7 @@ WeakPtr<PulseAudioContext> PulseAudioContext::weak_instance()
return the_instance;
}
ErrorOr<NonnullRefPtr<PulseAudioContext>> PulseAudioContext::instance()
ErrorOr<NonnullRefPtr<PulseAudioContext>> PulseAudioContext::the()
{
static Threading::Mutex instantiation_mutex;
// Lock and unlock the mutex to ensure that the mutex is fully unlocked at application

View File

@@ -40,7 +40,7 @@ class MEDIA_API PulseAudioContext
, public Weakable<PulseAudioContext> {
public:
static AK::WeakPtr<PulseAudioContext> weak_instance();
static ErrorOr<NonnullRefPtr<PulseAudioContext>> instance();
static ErrorOr<NonnullRefPtr<PulseAudioContext>> the();
explicit PulseAudioContext(pa_threaded_mainloop*, pa_mainloop_api*, pa_context*);
PulseAudioContext(PulseAudioContext const& other) = delete;