https://bugs.kde.org/show_bug.cgi?id=523693
--- Comment #2 from Dan <[email protected]> --- Created attachment 195100 --> https://bugs.kde.org/attachment.cgi?id=195100&action=edit Query native sample rate from source instead of hardcoding 44.1kHz Ok Nate, here's the patch. Thanks! *** 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. BUG: 523693 -- You are receiving this mail because: You are watching all bug changes.
