<br><div>I am having an issue using the simple API since upgrading from 0.9.14 (ubuntu 0.9.04) to 0.9.19 (ubuntu 0.9.10).  After quite a bit of debugging, I have been able to at least isolate the problem a little bit.  I&#39;ve confirmed with a few different users that this problem exists and the (really horrible) workaround fixes it.  Here&#39;s the basics:</div>
<div><br></div><div>My application opens an input stream from pulse and then starts a thread to read input from a source.  So I&#39;m basically running pa_simple_new() and starting a thread that runs pa_simple_read() until it sees a flag change to tell it to stop.</div>
<div><br></div><div>My app has a loop which reads 640 bytes of input from the source and then sends it into a pipe.  There is really nothing in between these functions.  It&#39;s more or less just read 640 bytes and then send to the pipe.  Here is the debug output:</div>
<div><br></div><div><div>main input iteration</div><div>reading 640 bytes from pulse source</div><div>iteration after 0.000006 seconds</div><div>reading 640 bytes from pulse source</div><div>iteration after 0.000014 seconds</div>
<div>reading 640 bytes from pulse source</div><div>iteration after 0.000020 seconds</div><div>reading 640 bytes from pulse source</div><div><br></div><div>This shows that I&#39;ve read 640 bytes of PCM data (at 44.1khz) in 6 microseconds.  To preempt the question, no, this is not buffered data.  this is consistently reading this way immediately after opening.</div>
<div><br></div><div>Now the really weird part is this: If I open up the PulseAudio Device Chooser and open up the volume control app, it immediately starts working as expected.  I get about 0.01 seconds of audio (640 bytes of PCM@44.1khz) and everything is perfect as shown here:</div>
<div><br></div><div><div>main input iteration</div><div>reading 640 bytes from pulse source</div><div>iteration after 0.010879 seconds</div><div>reading 640 bytes from pulse source</div><div>iteration after 0.010899 seconds</div>
<div>reading 640 bytes from pulse source</div><div><br></div></div><div>If anyone has any ideas as to what could be causing this, please let me know.</div><div><br></div><div>Thanks,</div><div><br></div><div>Eric</div></div>