Go Back   maemo.org - Talk > OS / Platform > Maemo 5 / Fremantle
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #1  
Old 2014-10-22, 23:53
jonwil jonwil is offline
 
Join Date: Oct 2009
Posts: 567
Thanks!: 0
Thanked 2,964 Times in 448 Posts
Default 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)
Reply With Quote
The Following 10 Users Say Thank You to jonwil For This Useful Post:
  #2  
Old 2014-10-23, 08:33
Ilew Ilew is offline
 
Join Date: Aug 2012
Posts: 75
Thanks!: 106
Thanked 269 Times in 69 Posts
Default 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.
Reply With Quote
The Following 2 Users Say Thank You to Ilew For This Useful Post:
  #3  
Old 2014-10-23, 22:37
jonwil jonwil is offline
 
Join Date: Oct 2009
Posts: 567
Thanks!: 0
Thanked 2,964 Times in 448 Posts
Default Re: Anyone out there understand pulseaudio sources and sinks?

Ended up finding some people on #pulseaudio that could answer my questions.
Reply With Quote
The Following 5 Users Say Thank You to jonwil For This Useful Post:
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:29.