<DIV>I am trying to pull data from an audio sink to use for a spectrum analyzer that I am coding up.&nbsp; When I try to output the data, I get all zeroes.&nbsp; I did not quite understand the documentation on the gstreamer website.&nbsp; Any suggestions?&nbsp; Here is a fragment of my code pertaining to this issue:</DIV>
<DIV>&nbsp;</DIV>
<DIV>// First, I get the sink pad from the audio sink</DIV>
<DIV>GstPad *sinkpad;</DIV>
<DIV>sinkpad = gst_element_get_pad (audiosink, "sink");</DIV>
<DIV>&nbsp;</DIV>
<DIV>GstBuffer *buffer, *outbuffer;</DIV>
<DIV>while (1) {<BR>&nbsp;&nbsp;&nbsp; // For testing purposes, I put it into an infinite loop.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; // I pull from the sinkpad</DIV>
<DIV>&nbsp;&nbsp;&nbsp; buffer = gst_pad_pull (sinkpad);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; //&nbsp;output&nbsp;the size&nbsp;of the data and the actual data to the screen<BR>&nbsp;&nbsp;&nbsp; cout &lt;&lt; buffer-&gt;size &lt;&lt; endl;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; for (int i=0; i&lt;buffer-&gt;size; ++i)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; buffer-&gt;data[i] &lt;&lt; ", ";<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;&nbsp;&nbsp; gst_bin_iterate (GST_BIN (pipeline));<BR>&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=21260/*http://photos.yahoo.com">New Yahoo! Photos - easier uploading and sharing</a>