public class AudioDatasetHelper extends Object
Constructor and Description |
---|
AudioDatasetHelper() |
Modifier and Type | Method and Description |
---|---|
static long |
calculateStreamLength(ListDataset<List<SampleBuffer>> samples)
Calculate the length of the stream of samples that will come from the dataset.
|
static AudioStream |
getAudioStream(ListDataset<List<SampleBuffer>> samples)
From a dataset that contains sample buffers, this method will return an
AudioStream which will return each of the sample buffers in turn. |
public AudioDatasetHelper()
public static AudioStream getAudioStream(ListDataset<List<SampleBuffer>> samples)
AudioStream
which will return each of the sample buffers in turn.
The returned stream will have an undefined length (-1). If you need to know
the length of the stream, use calculateStreamLength(ListDataset)
.samples
- The samplespublic static long calculateStreamLength(ListDataset<List<SampleBuffer>> samples)
samples
- The sample list