|
|||||||||
| Home >> All >> marf >> [ Storage overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
marf.Storage
Class SampleLoader

java.lang.Objectmarf.Storage.SampleLoader
- All Implemented Interfaces:
- ISampleLoader
- public abstract class SampleLoader
- extends java.lang.Object
- implements ISampleLoader
- extends java.lang.Object
Absract class that provides samle loading interface. Must be overriden by a concrete sample loader.
$Id: SampleLoader.java,v 1.22 2005/06/16 19:58:54 mokhov Exp $
- Since:
- 0.0.1
- Version:
- $Revision: 1.22 $
| Field Summary | |
protected int |
iRequiredBitSize
Current bit size of a sample. |
protected int |
iRequiredChannels
Current number of channels. |
protected float |
iRequiredFrequency
Current frequency. |
protected javax.sound.sampled.AudioFormat |
oAudioFormat
Properties of a sound sample. |
protected javax.sound.sampled.AudioInputStream |
oAudioInputStream
Stream representing sound sample. |
protected java.io.ByteArrayOutputStream |
oByteArrayOutputStream
Output stream used for writing audio data. |
protected Sample |
oSample
Sample references of the sample to be loaded. |
| Fields inherited from interface marf.Storage.ISampleLoader |
DEFAULT_CHANNELS, DEFAULT_FREQUENCY, DEFAULT_SAMPLE_BIT_SIZE, MARF_INTERFACE_CODE_REVISION |
| Constructor Summary | |
SampleLoader()
Default constructor. |
|
| Method Summary | |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
Sample |
getSample()
Returns internal reference to a Sample object. |
long |
getSampleSize()
Retrieves the length of the sample (# of audio data in the audio stream). |
Sample |
loadSample(java.lang.String pstrFilename)
Same as loadSample(File) but takes filename as an argument. |
void |
reset()
Resets the marker for the audio stream. |
void |
saveSample(java.lang.String pstrFilename)
Same as saveSample(File) but takes filename as an argument. |
void |
setSample(Sample poSample)
Sets internal sample reference from outside. |
void |
updateSample()
updateSample() is just used whenever the
AudioInputStream is assigned to a new value (wave file). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface marf.Storage.ISampleLoader |
loadSample, readAudioData, saveSample, writeAudioData |
| Field Detail |
iRequiredBitSize
protected int iRequiredBitSize
- Current bit size of a sample.
iRequiredChannels
protected int iRequiredChannels
- Current number of channels.
oSample
protected Sample oSample
- Sample references of the sample to be loaded.
oAudioFormat
protected javax.sound.sampled.AudioFormat oAudioFormat
- Properties of a sound sample.
oAudioInputStream
protected javax.sound.sampled.AudioInputStream oAudioInputStream
- Stream representing sound sample.
oByteArrayOutputStream
protected java.io.ByteArrayOutputStream oByteArrayOutputStream
- Output stream used for writing audio data.
iRequiredFrequency
protected float iRequiredFrequency
- Current frequency.
- Since:
- 0.3.0
| Constructor Detail |
SampleLoader
public SampleLoader()
- Default constructor.
Instantiates
ByteArrayOutputStream.
| Method Detail |
loadSample
public Sample loadSample(java.lang.String pstrFilename) throws StorageException
- Same as loadSample(File) but takes filename as an argument.
- Specified by:
loadSamplein interfaceISampleLoader
saveSample
public void saveSample(java.lang.String pstrFilename) throws StorageException
- Same as saveSample(File) but takes filename as an argument.
- Specified by:
saveSamplein interfaceISampleLoader
updateSample
public void updateSample()
throws StorageException
updateSample()is just used whenever theAudioInputStreamis assigned to a new value (wave file). Then you would simply call this method to update theSamplemember with the contents of the newAudioInputStream.- Specified by:
updateSamplein interfaceISampleLoader
reset
public void reset()
throws StorageException
- Resets the marker for the audio stream. Used after writing audio data
into the sample's audio stream.
- Specified by:
resetin interfaceISampleLoader
getSampleSize
public long getSampleSize()
throws StorageException
- Retrieves the length of the sample (# of audio data in the audio stream).
- Specified by:
getSampleSizein interfaceISampleLoader
getSample
public final Sample getSample()
- Returns internal reference to a Sample object.
- Specified by:
getSamplein interfaceISampleLoader
setSample
public final void setSample(Sample poSample)
- Sets internal sample reference from outside.
- Specified by:
setSamplein interfaceISampleLoader
getMARFSourceCodeRevision
public static java.lang.String getMARFSourceCodeRevision()
- Returns source code revision information.
- Since:
- 0.3.0
|
|||||||||
| Home >> All >> marf >> [ Storage overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
marf.Storage.SampleLoader