Commit 39e8cba
perf(sound): optimize audio device switching performance
Filter invalid sink paths immediately before processing to avoid
unnecessary delays. Remove the 200ms blocking sleep that was originally
used for debouncing, as invalid signals are now filtered early and
valid signals arrive with sufficient intervals (typically >250ms).
This change improves UI responsiveness by eliminating the blocking
delay while maintaining stable device switching behavior.
优化音频设备切换性能
在处理前立即过滤无效的 sink 路径以避免不必要的延迟。移除原本用于
防抖的 200ms 阻塞延迟,因为无效信号现在会被提前过滤,而有效信号
到达的间隔已足够大(通常 >250ms)。
此改动通过消除阻塞延迟来提升 UI 响应速度,同时保持稳定的设备切换
行为。
Log: optimize audio device switching performance
PMS: BUG-2959291 parent a858879 commit 39e8cba
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 76 | + | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
| |||
0 commit comments