maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Anyone out there understand pulseaudio sources and sinks? (https://talk.maemo.org/showthread.php?t=94048)

jonwil 2014-10-22 23:53

Anyone out there understand pulseaudio sources and sinks?
 
I am looking for anyone who knows how pulseaudio sources and sinks work, how they are connected together and how the various pa_sink_xxx and pa_source_xxx APIs (those related to creating sinks and linking things together and such specifically)

More specifically I am working on building a map of all the sinks and sources in Maemo Fremantle connected with the voice side of things and the module-nokia-voice module so I can map where audio going into that module comes from and where audio comming out of that module goes to.
Anyone who can help, please let me know (here or in IRC, I am in IRC a lot these days)

Ilew 2014-10-23 08:33

Re: Anyone out there understand pulseaudio sources and sinks?
 
I dunno how useful this would be but the recaller app deals with audio sinks and sources, so maybe the maintainer of recaller could help?
That is if they're still around...

Either way the following code specifies different pulsesrc devices with their matching sink and source.

Code:
Code:

if self.source == "Phone":
self.launcher = "adder name=theAdder ! %s ! filesink location=\"%s\" . pulsesrc device=sink.hw0.monitor ! queue name=q1 ! theAdder. pulsesrc device=source.hw0 ! audioamplify amplification=30.0 ! queue name=q2 ! theAdder."  % (enc,self.fileName)
elif self.source == "Bluetooth":
self.launcher = "adder name=theAdder ! %s ! filesink location=\"%s\" . pulsesrc device=sink.hw1.monitor ! audioamplify amplification=10.0 ! queue name=q1 ! theAdder. pulsesrc device=source.hw1 ! audioamplify amplification=5.0 ! queue name=q2 ! theAdder."  % (enc,self.fileName)
elif self.source == "Dictaphone":
self.launcher = "pulsesrc device=source.hw0 ! audioconvert ! audioamplify amplification=30.0 ! queue ! %s ! filesink location=\"%s\"" % (enc,self.fileName)
elif self.source == "System":
self.launcher = "pulsesrc device=sink.hw0.monitor ! audioconvert ! queue ! %s ! filesink location=\"%s\"" % (enc,self.fileName)


If you can't read python it's similar to the following C code:
Code:

if (strcmp(source, "phone") == 0) {
    gst_parse_launch ("adder name=theAdder ! %s ! filesink location=\"%s\" . pulsesrc device=sink.hw0.monitor ! queue name=q1 ! theAdder. pulsesrc device=source.hw0 ! audioamplify amplification=30.0 ! queue name=q2 ! theAdder.",enc,fileName);
}

Hope it's helpful.

jonwil 2014-10-23 22:37

Re: Anyone out there understand pulseaudio sources and sinks?
 
Ended up finding some people on #pulseaudio that could answer my questions.


All times are GMT. The time now is 00:40.

vBulletin® Version 3.8.8