Reply
Thread Tools
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#1
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)
 

The Following 10 Users Say Thank You to jonwil For This Useful Post:
Posts: 75 | Thanked: 269 times | Joined on Aug 2012
#2
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.
 

The Following 2 Users Say Thank You to Ilew For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#3
Ended up finding some people on #pulseaudio that could answer my questions.
 

The Following 5 Users Say Thank You to jonwil For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 17:44.