Package ipsk.audio
Class BasicAudioSource
- java.lang.Object
-
- ipsk.audio.BasicAudioSource
-
- All Implemented Interfaces:
AudioSource
- Direct Known Subclasses:
AudioClip
,ByteArrayAudioSource
,FileAudioSource
,SineWaveGeneratorSource
,URLAudioSource
,VectorBufferAudioSource
,VectorBufferRawAudioSource
,WhiteNoiseGeneratorSource
public abstract class BasicAudioSource extends java.lang.Object implements AudioSource
Basic audio source implementation.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.sound.sampled.AudioFormat
audioFormat
protected java.lang.Long
frameLengthObj
-
Fields inherited from interface ipsk.audio.AudioSource
DATA_FLAVOR
-
-
Constructor Summary
Constructors Constructor Description BasicAudioSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract javax.sound.sampled.AudioInputStream
getAudioInputStream()
Returns a new audio input stream.javax.sound.sampled.AudioFormat
getFormat()
long
getFrameLength()
boolean
isRandomAccessible()
protected void
setAudioFormat(javax.sound.sampled.AudioFormat audioFormat)
protected void
setFrameLength(long frameLength)
-
-
-
Method Detail
-
getAudioInputStream
public abstract javax.sound.sampled.AudioInputStream getAudioInputStream() throws AudioSourceException
Description copied from interface:AudioSource
Returns a new audio input stream.- Specified by:
getAudioInputStream
in interfaceAudioSource
- Returns:
- a new audio input stream
- Throws:
AudioSourceException
-
getFrameLength
public long getFrameLength() throws AudioSourceException
- Specified by:
getFrameLength
in interfaceAudioSource
- Throws:
AudioSourceException
-
getFormat
public javax.sound.sampled.AudioFormat getFormat() throws AudioSourceException
- Specified by:
getFormat
in interfaceAudioSource
- Throws:
AudioSourceException
-
setAudioFormat
protected void setAudioFormat(javax.sound.sampled.AudioFormat audioFormat)
-
setFrameLength
protected void setFrameLength(long frameLength)
-
isRandomAccessible
public boolean isRandomAccessible()
-
-