as.clynx.audio.mux.streams
Class PlayListProvider

java.lang.Object
  extended by as.clynx.audio.mux.streams.PlayListProvider

public class PlayListProvider
extends java.lang.Object

Provides the ordering of the played tracks.

Version:
cLynx v.1.2, JDK 6.0: 20.09.2007
Author:
Andreas Senfter - andreas@senfters.com

Constructor Summary
PlayListProvider(IAudioFileCollection collection, IIndexer indexer)
          Constructor
 
Method Summary
 void arrange()
          arranges the audiofilearray as specified from the indexer.
 void cleanUP(DefaultChannelProvider provider)
          cleans the file list. removes and closes all finished streams from the AudioFileCollection.
 AudioFile getAudioFile(int trackNO)
          returns the audioInputStream of the
 int getMaxSupportedValue()
          returns the maximal supported sample value
 int getMinSupportedValue()
          returns the minimal supported sample value
 javax.sound.sampled.AudioInputStream getStream(int trackNO)
          returns the audioInputStream of the
 int normalize(int i, int sample)
          returns the normalized samplevalue
 void rearrange(int root)
          arranges the audiofilearray as specified from the indexer.
 int size()
          returns the NO of containing files
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayListProvider

public PlayListProvider(IAudioFileCollection collection,
                        IIndexer indexer)
Constructor

Parameters:
collection -
indexer -
Method Detail

arrange

public void arrange()
arranges the audiofilearray as specified from the indexer.


rearrange

public void rearrange(int root)
arranges the audiofilearray as specified from the indexer. Sets the Indexer to the passed root.

Parameters:
root -

cleanUP

public void cleanUP(DefaultChannelProvider provider)
             throws java.io.IOException
cleans the file list. removes and closes all finished streams from the AudioFileCollection.

Throws:
java.io.IOException

size

public int size()
returns the NO of containing files

Returns:
the NO of containing files

getAudioFile

public AudioFile getAudioFile(int trackNO)
returns the audioInputStream of the

Parameters:
trackNO -
Returns:
the audioInputStream of the

getStream

public javax.sound.sampled.AudioInputStream getStream(int trackNO)
returns the audioInputStream of the

Parameters:
trackNO -
Returns:
the audioInputStream of the

normalize

public int normalize(int i,
                     int sample)
returns the normalized samplevalue

Parameters:
i -
sample -
Returns:
the normalized samplevalue

getMaxSupportedValue

public int getMaxSupportedValue()
returns the maximal supported sample value

Returns:
the maximal supported sample value

getMinSupportedValue

public int getMinSupportedValue()
returns the minimal supported sample value

Returns:
the minimal supported sample value