mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
Resampler: Don't use the peaks resampler for upsampling
This patch fixes this assertion:
Assertion 'r->i_ss.rate >= r->o_ss.rate' failed at ../../src/pulsecore/resampler.c:1744, function peaks_init(). Aborting.
This commit is contained in:
parent
2bed8cda25
commit
c5cd65d81e
1 changed files with 10 additions and 0 deletions
|
|
@ -226,6 +226,16 @@ static pa_resample_method_t pa_resampler_fix_method(
|
|||
method = PA_RESAMPLER_AUTO;
|
||||
}
|
||||
break;
|
||||
|
||||
/* The Peaks resampler only supports downsampling.
|
||||
* Revert to auto if we are upsampling */
|
||||
case PA_RESAMPLER_PEAKS:
|
||||
if (rate_a < rate_b) {
|
||||
pa_log_warn("The 'peaks' resampler only supports downsampling, reverting to resampler 'auto'.");
|
||||
method = PA_RESAMPLER_AUTO;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue