https://bugs.kde.org/show_bug.cgi?id=523693

Nate Graham <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|                            |6.8.0
  Fixed/Implemented|                            |
                 In|                            |
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/plasma-pa/-/commit/45925
                   |                            |6d5482cab598da6e87642e72dff
                   |                            |a93a99c9

--- Comment #6 from Nate Graham <[email protected]> ---
Git commit 459256d5482cab598da6e87642e72dffa93a99c9 by Nate Graham, on behalf
of Dan Fi.
Committed on 17/08/2026 at 18:54.
Pushed by ngraham into branch 'master'.

Use the source's native sample rate for the microphone test

MicrophoneTest hardcoded the record/playback sample rate to
44.1 kHz. When the selected source (m_source) actually runs at a
different native rate — 48 kHz being common with PipeWire — this
forces the audio server to switch the stream/node clock rate for
the whole graph, triggering unnecessary resampling.

Query the source's native sample rate via
pa_context_get_source_info_by_name() before starting the record
stream, and reuse the detected rate for both the record and the
playback pa_sample_spec. The previous synchronous stream setup is
now split into startRecording() (kicks off the async query) and
beginRecording() (does the actual stream setup), invoked from the
source_info_callback(). Falls back to the previous 44.1 kHz default
if the query cannot be issued.

Test Plan:

Tested microphone test with a source running at 48 kHz
on PipeWire; confirmed via `pw-top` that the node clock rate no
longer switches to 44100 Hz during the test. Also verified the
fallback path (default 44.1 kHz) still works when the source info
query fails.
FIXED-IN: 6.8.0

M  +44   -3    src/microphonetest.cpp
M  +6    -0    src/microphonetest.h

https://invent.kde.org/plasma/plasma-pa/-/commit/459256d5482cab598da6e87642e72dffa93a99c9

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to