mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-21 06:59:59 -05:00
virtual sink: Factor out common code
This patch moves the code for the virtual sink callbacks and initialization to a separate file. The code is re-factored, extended and built as library, so that it can be used by other virtual sinks as well. The suspend-virtual-on-master-suspend fix for the ladspa sink (!68) was incorporated into the common code as well as the sink part of !78 which fixes a crash with stacked virtual sinks. !68 has a bug which leaves a virtual sink unavailable when the master sink disappears. This bug is also fixed. Additionally, fixed block size filters, fixed window size filters and updating filter parameters are supported by the library. Fixed window size filters always deliver the same number of frames to the filter, padding new data with history frames if necessary. Rewinding can be disabled or or limited to the number of frames that the virtual sink supports. Thanks to Alexander E. Patrakov for pointing out how to rewind fixed block size filters. The library implements following command line arguments if they are enabled in valid_modargs: sink_name, sink_properties, sink_input_properties, force_flat_volume, remix, resample_method and autoloaded.
This commit is contained in:
parent
d18756fda9
commit
1edc7eb655
6 changed files with 1532 additions and 527 deletions
|
|
@ -112,6 +112,11 @@ bool pa_memblockq_is_readable(pa_memblockq *bq);
|
|||
/* Return the length of the queue in bytes */
|
||||
size_t pa_memblockq_get_length(pa_memblockq *bq);
|
||||
|
||||
/* Return the number of bytes missing to achieve the target length.
|
||||
* If the number of missing bytes is smaller than minreq but larger
|
||||
* than 0, minreq will be returned. */
|
||||
size_t pa_memblockq_get_missing(pa_memblockq *bq);
|
||||
|
||||
/* Return the number of bytes that are missing since the last call to
|
||||
* this function, reset the internal counter to 0. */
|
||||
size_t pa_memblockq_pop_missing(pa_memblockq *bq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue