def read_audio(buffer, max_samples = 2048)
      samples = ps_api.ad_read(@ps_audio_device, buffer, max_samples)
      samples if samples >= 0
    end
def read_audio(buffer, max_samples = 2048)
      samples = ps_api.ad_read(@ps_audio_device, buffer, max_samples)
      samples if samples >= 0
    end
Read next block of audio samples while recording; read upto max samples into buf.

 @param [FFI::Pointer] buffer 16bit buffer of at least max_samples in size
 @params [Fixnum] max_samples The maximum number of samples to read from the audio device
 @return [Fixnum] Samples actually read (could be 0 since non-blocking); nil if not
   recording and no more samples remaining to be read from most recent recording.