[pulseaudio-discuss] [PATCH 2/2] module-virtual-surround-sound: limit number of hrir samples

Niels Ole Salscheider niels_ole at salscheider-online.de
Fri Oct 5 11:37:54 PDT 2012


---
 src/modules/module-virtual-surround-sink.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/modules/module-virtual-surround-sink.c b/src/modules/module-virtual-surround-sink.c
index 14a666f..0690769 100644
--- a/src/modules/module-virtual-surround-sink.c
+++ b/src/modules/module-virtual-surround-sink.c
@@ -724,6 +724,11 @@ int pa__init(pa_module*m) {
                                  PA_RESAMPLER_SRC_SINC_BEST_QUALITY, PA_RESAMPLER_NO_REMAP);
 
     u->hrir_samples = hrir_temp_chunk.length / pa_frame_size(&hrir_temp_ss);
+    if (u->hrir_samples > 64) {
+        u->hrir_samples = 64;
+        pa_log("The hrir file 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);
     u->hrir_channels = hrir_ss.channels;
 
-- 
1.7.12.2



More information about the pulseaudio-discuss mailing list