Skip to content

Commit ee86167

Browse files
mhduiydeepin-bot[bot]
authored andcommitted
perf(sound): remove blocking delay in audio device switching
Remove the 200ms blocking sleep (QThread::msleep) that was originally used for debouncing multiple signals during device switching. Analysis shows that valid signals arrive with sufficient intervals (>250ms), making the blocking delay unnecessary and harmful to UI responsiveness. 移除音频设备切换中的阻塞延迟 移除原本用于防抖多个信号的 200ms 阻塞延迟(QThread::msleep)。 分析表明有效信号到达的间隔已足够大(>250ms),使得阻塞延迟既不必要 又损害 UI 响应速度。 Log: remove blocking delay in audio device switching PMS: BUG-295929
1 parent a858879 commit ee86167

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

plugins/dde-dock/sound/soundcontroller.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ void SoundController::SetMute(bool in0)
7474
void SoundController::onDefaultSinkChanged(const QDBusObjectPath &path)
7575
{
7676
// 防止手动切换设备,与后端交互时,获取到多个信号,设备切换多次,造成混乱
77-
QThread::msleep(200);
7877

7978
if (m_defaultSinkInter)
8079
m_defaultSinkInter->deleteLater();

0 commit comments

Comments
 (0)