[pulseaudio-discuss] new module module-plugin-sink

Georg Chini georg at chini.tk
Fri May 3 04:31:22 UTC 2019

On 03.05.19 02:22, Alexander E. Patrakov wrote:
> чт, 2 мая 2019 г. в 23:45, Georg Chini <georg at chini.tk>:
>> Hi,
>> I created a new module-plugin-sink and a small amplifier demo plugin
>> based on the attached header file. I did not (yet) drop max_latency,
>> disable_rewind and rewind_filter() because I am still waiting for more
>> feedback on the specification. I made it however more clear (using
>> Alexander's wording) that this should only be used if "real" rewinding
>> is possible.
> Thanks for that.
> However, the interface still thinks in terms of "number of channels",
> which is, in the general case, wrong. E.g., a "proper"
> module-virtual-surround-sink (not what we currently have) would sound
> differently if given the same samples in "5.1" and "5.1 (Side)"
> channel layouts.
I do not understand what you mean. How would you do it without
number of channels? You have to know how many input and
output channels are there, otherwise you can't process audio.
> I wouldn't mind the number of channels, if we limit the interface to
> "true" filters that have the same number of input and output channels
> and don't care about the channel map. I.e., explicitly declare the
> virtual surround sink as out-of-scope. But then, what useful things
> are left in scope except the equalizer and maybe a dynamic range
> compressor?
Why would there be any reason to limit it to filters with
equal number of channels?
> Also, please make sure that, in the callbacks, the filter handle
> always comes as the first parameter.
No problem, but usually in pulseaudio the userdata pointer
comes last in callbacks.
> Regarding the virtual surround plugin, I actually have one more
> business argument why, if implemented properly (and not how it is done
> currently) it should be out of scope. The reason is that this plugin
> with publicly available HRIRs only applies to headphones. From a
> usability perspective, it should be switched off (or to a different
> filter, specifically crafted for each set of speakers and the
> listening room) when the audio is playing to something else than
> headphones. The proposed interface does not have (and likely should
> not have, because we want to keep it simple and stable) any place to
> express such policy.
Why would that be a problem? You can have a boolean bypass
parameter that switches off the filter when needed. Or even a
choice that switches between different HRIR files.
> In other words, I am still very skeptical about the proposal, simply
> because we don't have enough filters to test the validity of the
> proposed interface.
I guess we need to start somewhere.

More information about the pulseaudio-discuss mailing list