mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
resample: small optimization
This commit is contained in:
parent
74c71e9bad
commit
c42b108ac8
1 changed files with 2 additions and 1 deletions
|
|
@ -55,8 +55,9 @@ static void impl_peaks_process(struct resample *r, int channel,
|
|||
while (i < *in_len && o < *out_len) {
|
||||
end = ((uint64_t) (pd->o_count + 1) * r->i_rate) / r->o_rate;
|
||||
end = end > pd->i_count ? end - pd->i_count : 0;
|
||||
end = SPA_MIN(end, *in_len);
|
||||
|
||||
for (; i < end && i < *in_len; i++) {
|
||||
for (; i < end; i++) {
|
||||
float n = fabsf(s[i]);
|
||||
if (n > pd->max_f[channel])
|
||||
pd->max_f[channel] = n;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue