Skip to content

Commit

Permalink
Revert "pulse: Set prebuf to min_audio_length instead of tlength"
Browse files Browse the repository at this point in the history
This reverts commit 2ea44ed.

Michael Gorse reported some regressions, see

https://mail.gnu.org/archive/html/speechd-discuss/2024-07/msg00000.html
  • Loading branch information
sthibaul committed Oct 28, 2024
1 parent 027e4fc commit 96f024f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/audio/pulse.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,9 @@ static int _pulse_open(spd_pulse_id_t * id, int sample_rate,

/* Set prebuf to one sample so that keys are spoken as soon as typed rather than delayed until the next key pressed */
buffAttr.maxlength = (uint32_t) - 1;
buffAttr.tlength = (uint32_t) -1;
buffAttr.prebuf = (uint32_t) id->pa_min_audio_length * sample_rate * num_channels * bytes_per_sample / 1000;
//buffAttr.tlength = (uint32_t)-1; - this is the default, which causes key echo to not work properly.
buffAttr.tlength = id->pa_min_audio_length * sample_rate * num_channels * bytes_per_sample / 1000;
buffAttr.prebuf = (uint32_t) - 1;
buffAttr.minreq = (uint32_t) - 1;
buffAttr.fragsize = (uint32_t) - 1;

Expand Down

0 comments on commit 96f024f

Please sign in to comment.