Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Merge PR #5926: FEAT(client): Always stop audio on/off cue when switching state" to 1.5.x #6018

Merged
merged 3 commits into from
Jan 10, 2023

Conversation

Krzmbrzl
Copy link
Member

@Krzmbrzl Krzmbrzl commented Jan 8, 2023

Backport

This will backport the following commits from master to 1.5.x:

Questions ?

Please refer to the Backport tool documentation

AudioOutput keeps track of users and their speech, as well as samples
in qmOutputs. The mix() method will iterate over them and append all
completed outputs to a list 'qlDel'. This list is then - outside
of any synchronization - used to remove entries from qmOutputs.
Previously, other methods were also deleting from qmOutputs directly from
other threads. In rare conditions, when the output just finished and is
added to qlDel and then additionally manually deleted, the pointer could be
subject to a double delete.

This commit tries to mitigate the problem and overhauls the output
deletion by introducing a singal and a slot, delegating the deletion
to the audio thread event queue. A new AudioOutputToken class is
introduced, to prevent direct access to audio buffer pointers.

(cherry picked from commit 7406495)
Previously, audio cues would play and continue to play no matter
what. If very long sound samples were used, they would play longer
than the user sends audio (regardless of PTT or VA) and they could
even play over each other.

The commit introduces a member in AudioInput to save the last
sample played for audio cues. When switching from talking to
non-talking or vice versa, it first stops the previously
played cue.

Fixes mumble-voip#1671

(cherry picked from commit 89d5890)
The name AudioOutputUser is a legacy one, or, in case it is meant as
"user of the audio output API", at least slightly misleading.
Since both AudioOutputSpeech and AudioOutputSample inherit AudioOutputUser
it makes more sense to name it as what it actually is: A buffer wrapper.

(cherry picked from commit d79850c)
@Krzmbrzl Krzmbrzl force-pushed the backport/1.5.x/pr-5926 branch from 9a9dc97 to 7f755b6 Compare January 9, 2023 15:18
@Krzmbrzl Krzmbrzl merged commit bc228b0 into mumble-voip:1.5.x Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants