Package Acquisition
Class AudioDataQueue
java.lang.Object
Acquisition.AudioDataQueue
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewData(RawDataUnit newDataUnit) voidaddNewData(RawDataUnit newDataUnit, int channel) voidlonggetQueuedSamples(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.intlonggetSamplesIn(int channel) longgetSamplesOut(int channel) booleanhasData()
-
Constructor Details
-
AudioDataQueue
public AudioDataQueue()
-
-
Method Details
-
clearList
public void clearList() -
hasData
public boolean hasData() -
getQueueSize
public int getQueueSize() -
removeOldest
-
addNewData
-
addNewData
-
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
-