File: chop

package info (click to toggle)
pcaudiolib 1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 288 kB
  • sloc: ansic: 1,685; cpp: 136; makefile: 61; sh: 12
file content (31 lines) | stat: -rw-r--r-- 987 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
commit 478bb69d51a945123a18dedf4bee7a3bede67f40
Author: Nicolas Pitre <nico@fluxnic.net>
Date:   Sat Apr 2 22:04:30 2022 -0400

    Fix audio choppiness on some systems
    
    Commit a41d46e816d2 ("Fix cancellation snappiness") made espeak unusable
    on the RaspberryPi due to extreme audio choppiness. This can sometimes
    be observed on some PC-type systems as well, albeit much less
    prominently.
    
    Relax the timing to the smallest value that makes it work again on the
    RaspberryPi.

diff --git a/src/audio_priv.h b/src/audio_priv.h
index 669a037..0c2ce3c 100644
--- a/src/audio_priv.h
+++ b/src/audio_priv.h
@@ -53,8 +53,10 @@ struct audio_object
 };
 
 /* We try to aim for 10ms cancelation latency, which will be perceived as
- * "snappy" by users */
-#define LATENCY 10
+ * "snappy" by users. However, some systems (e.g. RPi) do produce chopped
+ * audio when this value is smaller than 60.
+ */
+#define LATENCY 60
 
 #if defined(_WIN32) || defined(_WIN64)