mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
virtual-surround: Limit the number of hrir samples.
v2: better log message
This commit is contained in:
parent
e32a408b3c
commit
7448ef14ba
1 changed files with 5 additions and 0 deletions
|
|
@ -724,6 +724,11 @@ int pa__init(pa_module*m) {
|
||||||
PA_RESAMPLER_SRC_SINC_BEST_QUALITY, PA_RESAMPLER_NO_REMAP);
|
PA_RESAMPLER_SRC_SINC_BEST_QUALITY, PA_RESAMPLER_NO_REMAP);
|
||||||
|
|
||||||
u->hrir_samples = hrir_temp_chunk.length / pa_frame_size(&hrir_temp_ss) * hrir_ss.rate / hrir_temp_ss.rate;
|
u->hrir_samples = hrir_temp_chunk.length / pa_frame_size(&hrir_temp_ss) * hrir_ss.rate / hrir_temp_ss.rate;
|
||||||
|
if (u->hrir_samples > 64) {
|
||||||
|
u->hrir_samples = 64;
|
||||||
|
pa_log("The (resampled) hrir contains more than 64 samples. Only the first 64 samples will be used to limit processor usage.");
|
||||||
|
}
|
||||||
|
|
||||||
hrir_total_length = u->hrir_samples * pa_frame_size(&hrir_ss);
|
hrir_total_length = u->hrir_samples * pa_frame_size(&hrir_ss);
|
||||||
u->hrir_channels = hrir_ss.channels;
|
u->hrir_channels = hrir_ss.channels;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue