public void addListener(Listener<ComplexBuffer> listener){
synchronized (mComplexBufferBroadcaster) {
    mComplexBufferBroadcaster.addListener(listener);
    if (mBufferProcessor == null || !mBufferProcessor.isRunning()) {
      mBufferProcessor=new BufferProcessor();
      Thread thread=new Thread(mBufferProcessor);
      thread.setDaemon(true);
      thread.setName("HackRF Sample Processor");
      thread.start();
    }
  }
}

public void addListener ( Listener < ComplexBuffer > listener ) { synchronized ( mComplexBufferBroadcaster ) { mComplexBufferBroadcaster . addListener ( listener ) ; if ( mBufferProcessor == null || ! mBufferProcessor . isRunning ( ) ) { mBufferProcessor = new BufferProcessor ( ) ; Thread thread = new Thread ( mBufferProcessor ) ; thread . setDaemon ( true ) ; thread . setName ( "HackRF Sample Processor" ) ; thread . start ( ) ; } } }
adds a sample listener . if the buffer processing thread is not currently running , starts it running in a new thread .
