[pulseaudio-discuss] Monitor devices and unconnected sources.

Knut-Håvard Aksnes kna at tirsdagsklubben.nu
Fri Oct 24 04:40:05 PDT 2008


Knut-Håvard Aksnes wrote:
> I am working on an application where I listen to monitor interfaces. 
> The audio stream is intended to be merged with other AV streams later 
> down the processing pipeline using third party code, (open source but 
> quite complex to understand and modify). My problem is that the 
> application connecting to the pulse audio monitor might or might not 
> send audio, depending on user input, if it doesn't send audio it won't 
> connect to the pulse audio source, the application might also 
> disconnect the audio based on user input, before terminating itself. 
> (Audio is handled by plugins that might get loaded and unloaded based 
> on user input)
>
> My problem is that I really need to receive silence (zero filled audio 
> ) instead of empty packages from the monitor interface when no sources 
> is connected. Is it possible to configure pulse audio to give me this?
>
> The problem of implementing this myself in client code is to avoid 
> timing problems  when the client connects or disconnects at a later 
> stage. I need to do do non-blocking calls to the API and could easily 
> get into problems in differentiating between jitter and the situation 
> where no client are connected, but need to treat the two situations 
> differently. I might be able to handle part of it using 
> pa_stream_set_underflow_callback and pa_stream_set_started_callback 
> but I miss something like pa_stream_set_stopped_callback with a 
> callback for use on monitor interfaces when the last application 
> connected to a sink terminate the connection.
>
> If this is done using suspend/resume for monitor interfaces this 
> should be mentioned in the programmer API.
To clearify a little: I need to send a timestamped (adjusted for 
latency) audio stream downstream. This stream should be continous, audio 
should be sent even when no clients are connected to the interface being 
monitored. This should work even when clients connect, then disconnect 
and then the same or another application reconnects.
Is this possible using the existing API?
If the answer is yes how?
If the answer is no, could the API be  extended to make it possible?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kna.vcf
Type: text/x-vcard
Size: 507 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20081024/7a416e59/attachment.vcf>


More information about the pulseaudio-discuss mailing list