Package Acquisition

Class AudioDataQueue

java.lang.Object
Acquisition.AudioDataQueue

public class AudioDataQueue extends Object
Better management of new data list.

This is a queue that sits between individual acquisition systems and the main Acquisition process. DAQ systems write data units into this list in their own thread and data are read out in a different thread.

Author:
Doug Gillespie.
  • Constructor Details

    • AudioDataQueue

      public AudioDataQueue()
  • Method Details

    • clearList

      public void clearList()
    • hasData

      public boolean hasData()
    • getQueueSize

      public int getQueueSize()
    • removeOldest

      public RawDataUnit removeOldest()
    • addNewData

      public void addNewData(RawDataUnit newDataUnit)
    • addNewData

      public void addNewData(RawDataUnit newDataUnit, int channel)
    • getQueuedSamples

      public long getQueuedSamples(int channel)
      Get the total number of samples in the data queue based on the difference between the last sample put in and the last taken out.
      Parameters:
      channel - channel number
      Returns:
      number of stored samples in queue
    • getSamplesIn

      public long getSamplesIn(int channel)
      Returns:
      the samplesIn
    • getSamplesOut

      public long getSamplesOut(int channel)
      Returns:
      the samplesOut