public interface RecorderStorage
The PamRecorder process blocks the data from multiple channels and sends it to PamAudioFileStorage as an array of double arrays.
Modifier and Type | Method and Description |
---|---|
boolean |
addData(long dataTimeMillis,
double[][] newData)
Adds data to the store.
|
boolean |
closeStorage()
Closes the storage (and stops recording).
|
long |
getFileBytes()
Get the file size in bytes
|
long |
getFileMilliSeconds()
Get the file length in milliseconds
|
java.lang.String |
getFileName()
Gets the store file name.
|
boolean |
openStorage(javax.sound.sampled.AudioFileFormat.Type fileType,
long recordingStart,
float sampleRate,
int nChannels,
int bitDepth)
Open audio file storage
|
boolean |
reOpenStorage(long recordingStart)
Reopens the recording storage in a new file (if appropriate)
This is done in the RecorderStorage class rather than as separate
calls to closeStorage and openStorage in
|
boolean openStorage(javax.sound.sampled.AudioFileFormat.Type fileType, long recordingStart, float sampleRate, int nChannels, int bitDepth)
fileType
- Type of file storage (e.g. AU, AIFF, WAVE)recordingStart
- Start time of recording in milliseconds. The storage
system should base a file name on the timesampleRate
- Sample rate for the recordingnChannels
- Number of channels in the recordingbitDepth
- Number of bits (e.g. 8, 16, 24)boolean reOpenStorage(long recordingStart)
recordingStart
- new recording start time in millisecondsboolean addData(long dataTimeMillis, double[][] newData)
dataTimeMillis
- the time of the datanewData
- array of arrays of double data arranged by channel and sampleboolean closeStorage()
java.lang.String getFileName()
long getFileBytes()
long getFileMilliSeconds()