|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--marf.Storage.SampleLoader | +--marf.Storage.Loaders.WAVLoader
Loads/stores samples of WAV format.
$Id: WAVLoader.java,v 1.19 2005/06/03 17:09:58 mokhov Exp $
Field Summary |
Fields inherited from class marf.Storage.SampleLoader |
iRequiredBitSize, iRequiredChannels, iRequiredFrequency, oAudioFormat, oAudioInputStream, oByteArrayOutputStream, oSample |
Fields inherited from interface marf.Storage.ISampleLoader |
DEFAULT_CHANNELS, DEFAULT_FREQUENCY, DEFAULT_SAMPLE_BIT_SIZE, INTERFACE_CODE_REVISION |
Constructor Summary | |
WAVLoader()
WAVLoader Constructor. |
Method Summary | |
static java.lang.String |
getRevision()
Returns source code revision information. |
marf.Storage.Sample |
loadSample(java.io.File poInFile)
Loads WAV sample data from a file. |
int |
readAudioData(double[] padAudioData)
Buffers out the contents of atAudioBuffer into padAudioData. |
void |
reset()
Resets the marker for the audio and byte-array streams. |
void |
saveSample(java.io.File poOutFile)
Saves the wave into a file for playback. |
int |
writeAudioData(double[] padAudioData,
int piNbrWords)
Buffers the contents of padAudioData into atAudioBuffer. |
Methods inherited from class marf.Storage.SampleLoader |
getSample, getSampleSize, loadSample, saveSample, setSample, updateSample |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WAVLoader() throws StorageException
StorageException
- if the WAV file isn't really in WAV format
or any other error took place.Method Detail |
public marf.Storage.Sample loadSample(java.io.File poInFile) throws StorageException
poInFile
- incoming sample File object
StorageException
- if there was a problem loading the samplepublic final int readAudioData(double[] padAudioData) throws StorageException
padAudioData
- data array to fill in
StorageException
- if there was problem readin the audio datapublic final int writeAudioData(double[] padAudioData, int piNbrWords) throws StorageException
padAudioData
- array of data to be writtenpiNbrWords
- number of words to be written
StorageException
- if there was an error writing audio datapublic final void saveSample(java.io.File poOutFile) throws StorageException
poOutFile
- File object for output
StorageException
- if there was an error saving samplepublic void reset() throws StorageException
reset
in interface ISampleLoader
reset
in class SampleLoader
StorageException
- if there was an error resetting the streamspublic static java.lang.String getRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |