title: Native thread never get processor time when AudioRecord running
body: <p>I'm making an application for some speech processing. For speech recording is used Android <code>AudioRecord</code> class. The <code>AudioRecord</code> instance is put in a service. A separate thread is used for calling <code>read()</code> method of  <code>AudioRecord</code> class (there are enough examples on SO). The read samples are forward to my native  code for further processing and they are put in some queue. In a native code one thread is doing the processing. The problem is this thread never gets a processor time. 
  On finishing my app I call some function for cleaning my native resources. But it happens that whole process of cleaning isn't finished (I established it using calls). When I start the app again  my native processing is started (reading new samples isn't started yet).</p>
  
  <p>Is it possible that reading thread is using processor just for itself? Could I set a higher priority for my native (processor) thread. Or it could be some other problem.</p>
  
  <p>I've even tried using <code>AudioRecord.OnRecordPositionUpdateListener</code> and <code>onPeriodicNotification</code> but with no success.</p>