[pulseaudio-discuss] PA re-sampling and mute/unmute query

Tanu Kaskinen tanuk at iki.fi
Wed Jun 29 09:36:08 PDT 2011


These questions seem to have gone unanswered...

On Wed, 2011-06-22 at 17:47 +0530, Himanshu Chug wrote:
> Hi
> 
> 1. I am trying to understand the how PA mixes two different freq streams,
> say I am playing 2 playback streams one is 8000hz wav and other of 44100 hz
> wav at the same time ? how is re-sampling happens in PA level ? at what freq
> PA re-sample given streams in this e.g  before mixing and rendering on
> device?

Each sink has some static sample rate configured. When the sink requests
more data from the sink inputs, the input data is resampled to the
sink's sample rate.

> 2. Which part of PA code/ module is doing re-sampling and mixing here?

When the sink implementation wants more data from the inputs, it calls
pa_sink_render() or some of its variants.

> 3. I want to mute/unmute sink inputs on the fly ( i.e when the stream is
> running/playing), what PA API's can be used to achieve this ?

Client api or internal server api? For clients there's
pa_context_set_sink_input_mute(). The internal api has
pa_sink_input_set_mute().

-- 
Tanu



More information about the pulseaudio-discuss mailing list