Skip to content

Commit

Permalink
FIX(client): Fix PulseAudio regression by nulling buffer
Browse files Browse the repository at this point in the history
In b5a67c0 a buffer in the PulseAudio was made static, but
at the same time the memset(0) was removed.
In combination, that lead to a bug where the last few frames
of any given audio played back was repeated until something
else filled the buffer.

This commit adds a simple fill to the buffer where the memset(0)
previously was fixing the bug.
  • Loading branch information
Hartmnt committed Jan 24, 2024
1 parent 2f47f3e commit 9bb4486
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mumble/PulseAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ void PulseAudioSystem::write_callback(pa_stream *s, size_t bytes, void *userdata
pas->bAttenuating = (Global::get().bAttenuateOthers || Global::get().s.bAttenuateOthers);

} else {
std::fill(buffer.begin(), buffer.end(), 0);

// attenuate if intructed to (self-activated)
pas->bAttenuating = Global::get().bAttenuateOthers;
}
Expand Down

0 comments on commit 9bb4486

Please sign in to comment.