Raspberry Pi + pulseaudio
Экспериментирую тут с сетевым звуком пульсы. К Пи подключены колонки через аналоговый выход, пытаюсь завести пульсу так, чтобы она хотя бы локально нормально работала. Сейчас при проигрывании напрямую локального wav-файла через paplay есть задержка порядка 1-2 секунд до начала проигрывания. При этом aplay без пульсы проигрывает все совершенно нормально.
Дистрибы пробовал raspbian и арч - одна фигня. Мануалы по настройке пульсы курил - никакие оптимизации не помогли. Может кто-то сталкивался? Слышал мнение, что глюки со звуком могут быть связаны с кривостью железного audio output, но пока нет под рукой usb-звуковухи для проверки.
Вот есть выхлоп PA:
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Calculated software volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB (accurate-enough=yes)
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Volume not changing
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Requesting rewind due to end of underrun.
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Requested to rewind 19200 bytes.
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Limited to 17024 bytes.
Mar 08 22:34:02 alarmpi pulseaudio[18741]: before: 4256
Mar 08 22:34:02 alarmpi pulseaudio[18741]: after: 3360
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Rewound 13440 bytes.
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Processing rewind...
Mar 08 22:34:02 alarmpi pulseaudio[18741]: latency = 0
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Have to rewind 13440 bytes on render memblockq.
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Have to rewind 13440 bytes on render memblockq.
Mar 08 22:34:02 alarmpi pulseaudio[18741]: Processing rewind...
Mar 08 22:34:03 alarmpi pulseaudio[18741]: Server signalled buffer overrun/underrun.
Mar 08 22:34:03 alarmpi pulseaudio[18741]: Server reports playback started.
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Implicit drain of './Austin_Powers_danger.wav'
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 1644 bytes ago (17556 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 3564 bytes ago (15636 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 5484 bytes ago (13716 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 7404 bytes ago (11796 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 9324 bytes ago (9876 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 11244 bytes ago (7956 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 13164 bytes ago (6036 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 15084 bytes ago (4116 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 17004 bytes ago (2196 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Found underrun 18924 bytes ago (276 bytes ahead in playback buffer)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Drain acknowledged of './Austin_Powers_danger.wav'
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Requested volume: front-left: 56210 / 86% / -4.00 dB, front-right: 56210 / 86% / -4.00 dB
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Got hardware volume: front-left: 56210 / 86% / -4.00 dB, front-right: 56210 / 86% / -4.00 dB
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Calculated software volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB (accurate-enough=yes)
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Volume not changing
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Requested to rewind 19200 bytes.
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Limited to 18944 bytes.
Mar 08 22:34:06 alarmpi pulseaudio[18741]: before: 4736
Mar 08 22:34:06 alarmpi pulseaudio[18741]: after: 4736
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Rewound 18944 bytes.
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Processing rewind...
Mar 08 22:34:06 alarmpi pulseaudio[18741]: latency = 0
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Have to rewind 18944 bytes on render memblockq.
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Processing rewind...
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Freeing input 2 "./Austin_Powers_danger.wav"
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Freed 3 "paplay"
Mar 08 22:34:06 alarmpi pulseaudio[18741]: Connection died.