mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
virtual-surround: check if resampled memblock is not equal to input
Since commit e32a408b3c, we silence the
input memblock in order to give the resampler enough input samples, if
necessary.
But if there is no need to resample the hrir, the resampled memblock is
actually the same as the input memblock. Thus, we have to make sure that
we do not silence it in this case.
This commit is contained in:
parent
41055145d7
commit
523af5b302
1 changed files with 4 additions and 2 deletions
|
|
@ -738,8 +738,10 @@ int pa__init(pa_module*m) {
|
|||
/* add silence to the hrir until we get enough samples out of the resampler */
|
||||
while (hrir_copied_length < hrir_total_length) {
|
||||
pa_resampler_run(resampler, &hrir_temp_chunk, &hrir_temp_chunk_resampled);
|
||||
/* Silence input block */
|
||||
pa_silence_memblock(hrir_temp_chunk.memblock, &hrir_temp_ss);
|
||||
if (hrir_temp_chunk.memblock != hrir_temp_chunk_resampled.memblock) {
|
||||
/* Silence input block */
|
||||
pa_silence_memblock(hrir_temp_chunk.memblock, &hrir_temp_ss);
|
||||
}
|
||||
|
||||
if (hrir_temp_chunk_resampled.memblock) {
|
||||
/* Copy hrir data */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue