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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewData
(RawDataUnit newDataUnit) void
addNewData
(RawDataUnit newDataUnit, int channel) void
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.int
long
getSamplesIn
(int channel) long
getSamplesOut
(int channel) boolean
hasData()
-
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
-