Skip to content

Commit

Permalink
Fix default resampling quality selection
Browse files Browse the repository at this point in the history
When the user doesn't explicitly specify the resampling quality using the `-Q`
flag, the quality should be calculated based on Jack's server sampling rate.

This isn't the case, because the `rqual` variable is always set to 16 in
`jack_initialize`. This results in the quality always being 16.

To fix this and make the behavior the same as the `zita-ajbridge` tools, the
redundant `rqual` clamping of the value to the range `[16,96]` should be
removed from `jack_initialize()`, because this is done later in
`jack_initialize_part2()` only AFTER the quality calculation.
  • Loading branch information
gpascalauteufel committed Feb 1, 2025
1 parent 767acf0 commit 31435ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tools/zalsa/zita-a2j.cc
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ class zita_a2j
delete this;
return 1;
}
if (rqual < 16) rqual = 16;
if (rqual > 96) rqual = 96;
if ((fsamp < 8000) || (bsize < 16) || (nfrag < 2) || (nchan < 1))
{
jack_error (APPNAME ": Illegal parameter value(s).");
Expand Down
2 changes: 0 additions & 2 deletions tools/zalsa/zita-j2a.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,6 @@ class zita_j2a
delete this;
return 1;
}
if (rqual < 16) rqual = 16;
if (rqual > 96) rqual = 96;
if ((fsamp < 8000) || (bsize < 16) || (nfrag < 2) || (nchan < 1))
{
jack_error (APPNAME ": Illegal parameter value(s).");
Expand Down

0 comments on commit 31435ff

Please sign in to comment.