Skip to content

Commit

Permalink
Tweak reame on chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
HEnquist committed Sep 29, 2024
1 parent 385105c commit d1e4a35
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,10 @@ A parameter marked (*) in any example is optional. If they are left out from the
but since the entire chunk must be captured before processing,
it can cause unacceptably long delays.
Conversely, using a smaller chunk size can reduce latency
but will increase CPU usage and the risk of buffer underruns.
but will increase CPU usage.
Additionally, the shorter duration of each chunk makes CamillaDSP
more vulnerable to disruptions from other system activities,
potentially causing buffer underruns.

__Choosing chunk size for best performance__

Expand All @@ -961,8 +964,11 @@ A parameter marked (*) in any example is optional. If they are left out from the
The number of segments is calculated as `filter_length / chunk size`,
and rounded up to the nearest integer.

Using a smaller chunk size (more segments) can reduce latency
but is less efficient and needs more processing power.
Using a smaller chunk size (i.e. more segments) reduces latency
but makes the convoultion process less efficient and thus needs more processing power.
Although a smaller chunk size leads to increased CPU usage for all filters,
the difference is larger for FIR filters than the other types.

If you have long FIR filters, try different chunk sizes
to find the best balance between latency and processing power.

Expand Down

0 comments on commit d1e4a35

Please sign in to comment.