org.tritonus.share.sampled.convert
Class TAudioInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjavax.sound.sampled.AudioInputStream
          extended byorg.tritonus.share.sampled.convert.TAudioInputStream
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
TAsynchronousFilteredAudioInputStream, TSynchronousFilteredAudioInputStream

public class TAudioInputStream
extends AudioInputStream

AudioInputStream base class. This class implements "dynamic" properties. "Dynamic" properties are properties that may change during the life time of the objects. This is typically used to pass information like the current frame number, volume of subbands and similar values. "Dynamic" properties are different from properties in AudioFormat and AudioFileFormat, which are considered "static", as they aren't allowed to change after creating of the object, thereby maintaining the immutable character of these classes.


Field Summary
 
Fields inherited from class javax.sound.sampled.AudioInputStream
format, frameLength, framePos, frameSize, stream
 
Constructor Summary
TAudioInputStream(InputStream inputStream, AudioFormat audioFormat, long lLengthInFrames)
          Constructor without properties.
TAudioInputStream(InputStream inputStream, AudioFormat audioFormat, long lLengthInFrames, Map properties)
          Constructor with properties.
 
Method Summary
 Map properties()
          Obtain a Map containing the properties.
protected  void setProperty(String key, Object value)
          Set a property.
 
Methods inherited from class javax.sound.sampled.AudioInputStream
available, close, getFormat, getFrameLength, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TAudioInputStream

public TAudioInputStream(InputStream inputStream,
                         AudioFormat audioFormat,
                         long lLengthInFrames)
Constructor without properties. Creates an empty properties map.


TAudioInputStream

public TAudioInputStream(InputStream inputStream,
                         AudioFormat audioFormat,
                         long lLengthInFrames,
                         Map properties)
Constructor with properties. The passed properties map is not copied. This allows subclasses to change values in the map after creation, and the changes are reflected in the map the application program can obtain.

Method Detail

properties

public Map properties()
Obtain a Map containing the properties. This method returns a Map that cannot be modified by the application program, but reflects changes to the map made by the implementation.

Returns:
a map containing the properties.

setProperty

protected void setProperty(String key,
                           Object value)
Set a property. Unlike in AudioFormat and AudioFileFormat, this method may be used anywhere by subclasses - it is not restricted to be used in the constructor.