Commit graph

11 commits

Author SHA1 Message Date
Niels Ole Salscheider
3064511df6 virtual-surround-sink: Move normalization heuristic to its own function
This patch also adds a description how the heuristic works and mentions that
there is a scaling factor that can be adjusted if there is audible clipping.
2014-04-17 10:46:26 +03:00
Peter Meerwald
5196453117 modules: Remove redundant code in virtual-surround-sink
https://scan7.coverity.com:8443/reports.htm#v10206/p10016/fileInstanceId=8788&defectInstanceId=3710&mergedDefectId=591297

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-12-20 12:55:17 +01:00
poljar (Damir Jelić)
d806b19714 Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
    find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
        -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
        -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
        -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
        -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;

and:
    sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
        -e '181,194!s/\bTRUE\b/true/' -e \
        '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-07-04 12:25:30 +03:00
Stefan Huber
278ceb453f modules: Remove obsolete may_move_to callbacks
Some modules have source_output_may_move_to_cb() and
sink_input_may_move_to_cb() implemented that duplicate the default behavior.
Remove them.
2013-03-06 16:32:12 +02:00
Niels Ole Salscheider
523af5b302 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.
2012-11-29 05:28:39 +02:00
Tanu Kaskinen
3adbb5ad03 virtual-surround-sink: Fix setting max_request and max_rewind.
The sink has different frame size than the sink input, so
the max_request and max_rewind values of the sink input need
to be converted when setting the sink max_request and
max_rewind values.

The conversion is already done correctly in
sink_input_update_max_request_cb() and
sink_input_update_max_rewind_cb().
2012-10-30 16:28:48 +02:00
Niels Ole Salscheider
7448ef14ba virtual-surround: Limit the number of hrir samples.
v2: better log message
2012-10-24 12:13:29 +03:00
Niels Ole Salscheider
e32a408b3c virtual-surround: Add silence to hrir if necessary.
Otherwise, the hrir might be too short to get completely resampled

v2: take different sample rates into account
2012-10-24 12:11:54 +03:00
Tanu Kaskinen
3d6092bb0f memblock: Add pa_memblock_acquire_chunk().
Besides making the code a bit cleaner, this also gets rid of
a few "cast increases required alignment of target type"
warnings.
2012-08-22 09:47:03 +03:00
Tanu Kaskinen
9197c0323e Add comments referring to bug #53709. 2012-08-19 14:49:27 +03:00
Niels Ole Salscheider
6a9caff9dd Add module-virtual-surround-sink.
It provides a virtual surround sound effect.

v2: Normalize hrir to avoid clipping, some cleanups
v3: use fabs, not abs
v4: implement changes proposed by Tanu Kaskinen
v5: likewise
v6: use channel map from hrir file
v7: remove hrir_ss and hrir_map form userdata
v8: update naming of sink
2012-03-09 07:20:13 +02:00