|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.sound.sampled.AudioFileFormat marf.Storage.MARFAudioFileFormat
public class MARFAudioFileFormat
Supported MARF Audio File Formats.
NOTE: this code is still experimental.
Nested Class Summary | |
---|---|
static class |
MARFAudioFileFormat.Type
In addition to the types defined in AudioFileFormat.Type
defines MP3, MIDI, and ULAW formats and their extensions. |
Field Summary | |
---|---|
static int |
AIFF
AIFF sample format. |
static int |
AIFFC
AIFF-C sample format. |
static int |
AU
AU sample format. |
static int |
CUSTOM
Custom (plug-in) sample format. |
static int |
DEFAULT_CHUNK_SIZE
Default sample chunk's size (128). |
static int |
DEFAULT_SAMPLE_SIZE
Default sample array's size (1024). |
protected int |
iFormat
Current sample's format. |
static int |
MIDI
MIDI sample format. |
static int |
MP3
Indicates MP3 incoming sample file format. |
protected MARFAudioFileFormat.Type |
oType
File type. |
static int |
SINE
Sine sample format. |
static int |
SND
SND sample format. |
static int |
TEXT
Textual sample format. |
static int |
ULAW
Indicates ULAW incoming sample file format. |
static int |
UNK
Unknown sample format. |
static int |
WAV
Indicates WAVE incoming sample file format. |
Constructor Summary | |
---|---|
|
MARFAudioFileFormat()
Default constructor creates a WAVE-type format by default, which is PCM-signed, 16 bits, mono, little-endian. |
|
MARFAudioFileFormat(javax.sound.sampled.AudioFileFormat.Type poType,
javax.sound.sampled.AudioFormat poFormat,
int piFrameLength)
Mimics parent's constructor. |
|
MARFAudioFileFormat(int piFormat)
Constructs format instant given the format enumeration parameter and default AudioFormat parameters. |
|
MARFAudioFileFormat(MARFAudioFileFormat.Type poType,
javax.sound.sampled.AudioFormat poFormat,
int piFrameLength)
MARF-related constructor. |
protected |
MARFAudioFileFormat(MARFAudioFileFormat.Type poType,
int piByteLength,
javax.sound.sampled.AudioFormat poFormat,
int piFrameLength)
Constructs an audio file format object. |
Method Summary | |
---|---|
int |
getAudioFormat()
Retrieves current sample's format. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
MARFAudioFileFormat.Type |
setAudioFormat(int piFormat)
Sets current format of a sample. |
Methods inherited from class javax.sound.sampled.AudioFileFormat |
---|
getByteLength, getFormat, getFrameLength, getProperty, getType, properties, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNK
public static final int WAV
public static final int ULAW
public static final int MP3
public static final int SINE
public static final int AIFF
public static final int AIFFC
public static final int AU
public static final int SND
public static final int MIDI
public static final int CUSTOM
public static final int TEXT
public static final int DEFAULT_SAMPLE_SIZE
public static final int DEFAULT_CHUNK_SIZE
protected int iFormat
protected transient MARFAudioFileFormat.Type oType
Constructor Detail |
---|
public MARFAudioFileFormat() throws InvalidSampleFormatException
InvalidSampleFormatException
- since 0.3.0.6 as implementation delegated to MARFAudioFileFormat(int)MARFAudioFileFormat(int)
public MARFAudioFileFormat(int piFormat) throws InvalidSampleFormatException
piFormat
- the desired format instance.
InvalidSampleFormatException
- if the specified format cannot be setsetAudioFormat(int)
,
AudioFormat.Encoding#PCM_SIGNED
,
ISampleLoader.DEFAULT_FREQUENCY
,
ISampleLoader.DEFAULT_SAMPLE_BIT_SIZE
,
ISampleLoader.DEFAULT_CHANNELS
,
ISampleLoader.DEFAULT_FREQUENCY
public MARFAudioFileFormat(javax.sound.sampled.AudioFileFormat.Type poType, javax.sound.sampled.AudioFormat poFormat, int piFrameLength)
poType
- file formatpoFormat
- audio formatpiFrameLength
- frame lengthpublic MARFAudioFileFormat(MARFAudioFileFormat.Type poType, javax.sound.sampled.AudioFormat poFormat, int piFrameLength)
poType
- file formatpoFormat
- audio formatpiFrameLength
- frame lengthprotected MARFAudioFileFormat(MARFAudioFileFormat.Type poType, int piByteLength, javax.sound.sampled.AudioFormat poFormat, int piFrameLength)
poType
- type of the audio filepiByteLength
- length of the file in bytes, or AudioSystem.NOT_SPECIFIED
poFormat
- format of the audio data in the filepiFrameLength
- the audio data length in sample frames, or AudioSystem.NOT_SPECIFIED
Method Detail |
---|
public final int getAudioFormat()
public final MARFAudioFileFormat.Type setAudioFormat(int piFormat) throws InvalidSampleFormatException
piFormat
- format number from the enumeration
InvalidSampleFormatException
- if piFormat is out of rangepublic static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |