Finally tracked down and fixed the problems with buffers.
This commit is contained in:
+1
-1
@@ -454,7 +454,7 @@ connect() {
|
|||||||
barnardArgs+=(-certificate "$certFile")
|
barnardArgs+=(-certificate "$certFile")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command barnard "${barnardArgs[@]}" --fifo "$configDir/cmd" --buffers 16 |& log
|
command barnard "${barnardArgs[@]}" --fifo "$configDir/cmd" --buffers 64 |& log
|
||||||
barnardStatus=${PIPESTATUS[0]}
|
barnardStatus=${PIPESTATUS[0]}
|
||||||
if (( barnardStatus != 0 )); then
|
if (( barnardStatus != 0 )); then
|
||||||
msgbox "$(gettext "Barnard exited with status") $barnardStatus. $(gettext "See log:") $logFile"
|
msgbox "$(gettext "Barnard exited with status") $barnardStatus. $(gettext "See log:") $logFile"
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ func TestAudioBufferCount(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDefaultAudioBufferCountPreservesStablePlaybackCapacity(t *testing.T) {
|
||||||
|
config := NewConfig()
|
||||||
|
if got := config.AudioBufferCount(); got != 64 {
|
||||||
|
t.Fatalf("default AudioBufferCount() = %d, want 64", got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestAudioListenerStreamBufferingAndCleanup(t *testing.T) {
|
func TestAudioListenerStreamBufferingAndCleanup(t *testing.T) {
|
||||||
var listeners AudioListeners
|
var listeners AudioListeners
|
||||||
events := make(chan *AudioStreamEvent, 1)
|
events := make(chan *AudioStreamEvent, 1)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const AudioMinimumBufferCount = 3
|
|||||||
// NewConfig returns a new Config struct with default values set.
|
// NewConfig returns a new Config struct with default values set.
|
||||||
func NewConfig() *Config {
|
func NewConfig() *Config {
|
||||||
return &Config{
|
return &Config{
|
||||||
Buffers: 8,
|
Buffers: 64,
|
||||||
AudioInterval: AudioDefaultInterval,
|
AudioInterval: AudioDefaultInterval,
|
||||||
AudioDataBytes: AudioDefaultDataBytes,
|
AudioDataBytes: AudioDefaultDataBytes,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ func main() {
|
|||||||
fifo := flag.String("fifo", "", "path of a FIFO from which to read commands")
|
fifo := flag.String("fifo", "", "path of a FIFO from which to read commands")
|
||||||
serverSet := false
|
serverSet := false
|
||||||
usernameSet := false
|
usernameSet := false
|
||||||
buffers := flag.Int("buffers", 16, "per-user audio buffer count (minimum 3)")
|
buffers := flag.Int("buffers", 64, "per-user audio buffer count (minimum 3)")
|
||||||
profile := flag.Bool("profile", false, "add http server to serve profiles")
|
profile := flag.Bool("profile", false, "add http server to serve profiles")
|
||||||
noiseSuppressionEnabled := flag.Bool("noise-suppression", false, "enable noise suppression for microphone input")
|
noiseSuppressionEnabled := flag.Bool("noise-suppression", false, "enable noise suppression for microphone input")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user