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

            Bug ID: 523693
           Summary: Hardcoded 44.1kHz sample rate in MicrophoneTest causes
                    unnecessary PipeWire clock rate switching
    Classification: Plasma
           Product: plasmashell
      Version First 6.7.3
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Audio Volume widget
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: 1.0

In plasma-pa's MicrophoneTest component, the sample rate for recording and
playback is hardcoded to 44.1 kHz (constexpr int SAMPLE_RATE = 44100;).  When
performing a microphone test, this hardcoded rate forces audio servers like
PipeWire to switch the stream/node clock rate to 44100 Hz. For microphones and
devices operating natively at 48000 Hz (or higher), this triggers unnecessary
resamplers or clock rate switching across the audio graph.

Steps to reproduce:

1. Use an audio interface or microphone operating at 48000 Hz on PipeWire.

2. Open System Settings -> Sound and initiate a microphone test.

3. Observe the PipeWire graph / stream properties (pw-top).

Expected behavior:

MicrophoneTest should query and use the native sample rate of the selected
source (m_source) rather than enforcing a fixed 44.1 kHz rate.  

Proposed solution:

Query the native sample rate from PulseAudioQt::Source / m_source during
startRecording().  

Store the detected sample rate and pass it to pa_sample_spec for both recording
and playback streams (startRecording and playRecording).

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

Reply via email to