Skip to content

Commit

Permalink
enh: increase capture ring buffer size from 6 sec to 9 sec
Browse files Browse the repository at this point in the history
  • Loading branch information
tphakala committed Sep 26, 2024
1 parent 693898a commit 36d6900
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/analysis/realtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ func RealtimeAnalysis(settings *conf.Settings) error {
//log.Println("No RTSP sources configured, using malgo for audio capture")
sources = []string{"malgo"}
}
myaudio.InitRingBuffers(bufferSize*2, sources)

// Initialize ring buffers for each audio source
myaudio.InitRingBuffers(bufferSize*3, sources) // 3x buffer size to avoid underruns

// Audio buffer for extended audio clip capture
myaudio.InitAudioBuffers(60, conf.SampleRate, conf.BitDepth/8, sources)
Expand Down

0 comments on commit 36d6900

Please sign in to comment.