[pulseaudio-discuss] Switching resample_method on the fly?

Tanu Kaskinen tanuk at iki.fi
Wed Dec 30 05:49:20 PST 2009


ke, 2009-12-30 kello 10:56 +0000, Colin Guthrie kirjoitti:
> > I've looked around for how to set up such profiles for a few days but i
> > haven't found a way to do this.
> 
> There is no way to do this right now. I don't know that bit of the code
> to be honest so don't know how much work would be needed here. If you do
> implement something I'd certainly limit it to the roles rather than
> making it more flexible as too much configuration can be a bad thing!
> 
> I'm really not sure how much re-engineering ti would take to make this
> work, but it will certainly require some core changes. If the majority
> of the work could be kept within a module then this would certainly help
> keep the core as clean and tidy as possible for the majority of users.

I don't think that the core would need any changes. pa_sink_input
already has the field requested_resample_method, which is copied from
pa_sink_input_new_data, which in turn can be modified by modules before
the sink input is created. So the module would need to just come up with
a policy for choosing the resampler, for example the media.role property
could be used.

If the goal would be to write a good module that could be used by the
general public, then the biggest effort would be in writing a GUI and a
protocol for updating the policy.

If the goal would be to write just a quick hack, then a custom property
(eg. "media.preferred_resampler") could be invented that could be passed
as an environment variable when starting the music player, and the
module would just use that property when setting the resampler of the
new sink input.

-- 
Tanu Kaskinen




More information about the pulseaudio-discuss mailing list