这可能不止一个问题;在 VLC 中启动 YouTube 视频或视频文件时,音频在播放前会静音约 2 秒。在 Spotify 和其他程序中播放音频时也会出现同样的延迟问题。

然后,在播放视频时,它将正常播放 5 到 10 分钟,有时会更长,但不可避免地音频会中断约一秒钟,并反复中断几次,然后才恢复正常。

我读过一个解决方案,建议将 pulseaudio 配置文件从

## Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle 

## Automatically suspend sinks/sources that become idle for too long
 load-module module-suspend-on-idle 

但是,我似乎无法在 pulseaudio 配置文件中找到这些行

我没有遇到视频播放方面的其他问题。无论显示器刷新率为 60hz 还是 59.94hz,都会出现此问题。我很难诊断此问题。

输出aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC1150 Digital [ALC1150 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [AV Receiver]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pactl list输出:

Command 'pactl' not found, but can be installed with:
sudo apt install pulseaudio-utils

pulseaudio -k输出:

Command 'pulseaudio' not found, but can be installed with:
sudo apt install pulseaudio 

alsainfo.sh --no-upload输出:

alsa-info.sh: command not found

lspci -nn | grep '[04[80][13]]'输出:

00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31)
00:1f.0 ISA bridge [0601]: Intel Corporation Z170 Chipset LPC/eSPI Controller [8086:a145] (rev 31)
00:1f.3 Audio device [0403]: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller [8086:a170] (rev 31)
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38]
05:00.0 FireWire (IEEE 1394) [0c00]: VIA Technologies, Inc. VT6315 Series Firewire Controller [1106:3403] (rev 01)
0a:00.0 USB controller [0c03]: Intel Corporation DSL6540 USB 3.1 Controller [Alpine Ridge] [8086:15b6]

答案1

以下答案解决了音频启动延迟的问题,但未能解决播放过程中偶尔出现的音频丢失问题。感谢用户 h​​ananamar:https://askubuntu.com/a/1438571/721075

音频软件现在是 pipewire,不再是 pulseaudio。因此,@user1115995 的解决方案是禁用 pulseaudio 上的暂停功能,可以使用以下命令为 pipewire 执行此操作:(来源)

sudo sed -i 's/--\["session.suspend-timeout-seconds"\] = 5/\["session.suspend-timeout-seconds"\] = 0/'/usr/share/wireplumber/main.lua.d/50-alsa-config.lua
systemctl restart --user pipewire.service

相关内容