SoundSourcepublic class FileReader extends Object implements SoundSource
SoundSource.DataFormat| Modifier and Type | Field | Description |
|---|---|---|
static int |
BUFFER_SIZE |
| Constructor | Description |
|---|---|
FileReader(String fileName,
SoundSource.DataFormat fileDataFormat,
Logger logger) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
SoundSource.DataFormat |
dataProduced() |
|
boolean |
finished() |
|
byte[] |
readData() |
read raw data linear PCM 8kHz, 16 bits signed, mono-channel, little endian
|
void |
waitFinished() |
public static final int BUFFER_SIZE
public FileReader(String fileName, SoundSource.DataFormat fileDataFormat, Logger logger)
public void close()
public SoundSource.DataFormat dataProduced()
dataProduced in interface SoundSourcepublic byte[] readData()
SoundSourcereadData in interface SoundSourcepublic boolean finished()
finished in interface SoundSourcepublic void waitFinished()
throws InterruptedException
waitFinished in interface SoundSourceInterruptedExceptionCopyright © 2018. All rights reserved.