Duplicated audio sample played after silence
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
pipewire (Ubuntu) | Status tracked in Questing | |||||
Noble |
Confirmed
|
Medium
|
Ioanna Alifieraki | |||
Oracular |
Confirmed
|
Medium
|
Ioanna Alifieraki | |||
Plucky |
Confirmed
|
Medium
|
Ioanna Alifieraki | |||
Questing |
Confirmed
|
Medium
|
Ioanna Alifieraki |
Bug Description
[IMPACT]
Playing audio from on an Ubuntu instance Noble and later, results in duplicated audio samples
after a silence interval (no audio buffer pushed in the pipeline for some time).
It affects Noble, Oracular, Plucky and Questing.
The problem started because in Noble we've switched from pulseaudio to pipewire.
This issue is not reproducible on pulseaudio.
Upstream commit (1) is required as a depedency:
https:/
The issue is fixed by upstream commit (2):
https:/
[TEST CASE]
The issue is not always reproducible.
Install audacity and then launch 1 terminal + 1 pavucontrol + 1 audacity window and then:
- Start recording on audacity (even without playing anything)
- Execute the sample app with "./audio_test test_audio.wav"
- Go to pavucontrol and set:
--- In the playback tab, pick your audio output for 'audio_test' app
--- In the recording tab, pick the "Monitor of" the same audio output device for the audacity app
- Stop the recording in audacity and open a new clean audacity window (ctrl+n)
- Start recording and immediately jump to the terminal and execute the sample app (./audio_test test_audio.wav)
You will be able to see similar behavior in the audio spectrogram generated by audacity,
when comparing it with the one from the upstream bug (with the incorrect audio being played from the buffer after the silence). To make it more visible, you can import the audio file (test_audio.wav) using File>Import, align and compare them.
[WHERE PROBLEMS COULD OCUUR]
This SRU introduces 2 commits.
(1) https:/
pulse-server: make a function to silence a buffer
This commit changes the stream_process() function of pulse-server and cuts out some code to turn it into
a function without modifying it. The regression potential here is minimal (no any functional change), however
any potential problem would regard pulse server.
(2) https:/
pulse-server: clear old data when jumping forwards
This commit addresses the issue by checking if a forward jump has happened in the ringbuffer, if so
the samples jumped over are cleared. The change is happens in modules/
Any potential regression would affect audio playback.
[OTHER]
autopkgtest for N, O, P passing.
Upstream bugs:
https:/
https:/
description: | updated |
audio test 2 file