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.AudioFormataudioFormatprotected java.lang.LongframeLengthObj-
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.AudioInputStreamgetAudioInputStream()Returns a new audio input stream.javax.sound.sampled.AudioFormatgetFormat()longgetFrameLength()booleanisRandomAccessible()protected voidsetAudioFormat(javax.sound.sampled.AudioFormat audioFormat)protected voidsetFrameLength(long frameLength)
-
-
-
Method Detail
-
getAudioInputStream
public abstract javax.sound.sampled.AudioInputStream getAudioInputStream() throws AudioSourceExceptionDescription copied from interface:AudioSourceReturns a new audio input stream.- Specified by:
getAudioInputStreamin interfaceAudioSource- Returns:
- a new audio input stream
- Throws:
AudioSourceException
-
getFrameLength
public long getFrameLength() throws AudioSourceException- Specified by:
getFrameLengthin interfaceAudioSource- Throws:
AudioSourceException
-
getFormat
public javax.sound.sampled.AudioFormat getFormat() throws AudioSourceException- Specified by:
getFormatin interfaceAudioSource- Throws:
AudioSourceException
-
setAudioFormat
protected void setAudioFormat(javax.sound.sampled.AudioFormat audioFormat)
-
setFrameLength
protected void setFrameLength(long frameLength)
-
isRandomAccessible
public boolean isRandomAccessible()
-
-