<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
background:#EEEEEE;
font-size:10.0pt;
font-family:"Courier New";
color:darkblue;
font-weight:bold;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
color:darkblue;
background:#EEEEEE;
font-weight:bold;}
span.shcomment3
{mso-style-name:sh_comment3;}
span.shsymbol3
{mso-style-name:sh_symbol3;}
span.shfunction3
{mso-style-name:sh_function3;}
span.shstring3
{mso-style-name:sh_string3;}
span.shnumber3
{mso-style-name:sh_number3;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> My aim is as follows.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> Step 1:- Run an audio player in Ubuntu. Look at the client name it has generated in the pavucontrol gui’s client tab. Let us assume that the client created is “test”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> Step 2:- Try to connect to the client using a pulse audio function. I used an example code available on the net to do a connect.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<pre style="margin-left:.5in"> // Create a mainloop API and connection to the default server<o:p></o:p></pre>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"> pa_ml = pa_threaded_mainloop_new();<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"> pa_mlapi = pa_threaded_mainloop_get_api(pa_ml);<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:12.0pt;font-family:"Courier New";color:#00B050"> context = pa_context_new(pa_mlapi, "test"); // I have the same client name.<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"> // This function connects to the pulse server<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"> pa_context_connect(context, NULL, 0, NULL);</span></b><b><span style="font-size:10.0pt;font-family:"Courier New";color:#00B050"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"> // This function defines a callback so the server will tell us its state.<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"> //pa_context_set_state_callback(context, state_cb, NULL);<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in;background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"> pa_context_set_state_callback(context, context_state_cb, NULL);<o:p></o:p></span></b></p>
<p class="MsoNormal" style="background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="background:#EEEEEE"><b><span style="font-size:10.0pt;font-family:"Courier New";color:darkblue"><o:p> </o:p></span></b></p>
<p class="MsoNormal">I am kind of sure I am using the wrong function to connect to an existing client. Can anybody tell me which pulse audio function needs to be used for this purpose?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Sathish<o:p></o:p></p>
</div>
<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Information contained and transmitted by this e-mail is confidential and proprietary to iGATE and its affiliates and is intended for use only by the recipient. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator or <A href="mailto:mailadmin@igate.com">mailadmin@igate.com</A>. iGATE does not enter into any agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of iGATE. iGATE is not responsible for the consequences of any actions taken on the basis of information provided, through this email. The contents of an attachment to this e-mail may contain software viruses, which could damage your own computer system. While iGATE has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checks before opening an attachment. To know more about iGATE please visit <A href="http://www.igate.com">www.igate.com</A>.<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</body>
</html>