as.clynx.audio.mux.streams
Class DefaultSampleList

java.lang.Object
  extended by as.clynx.audio.mux.streams.DefaultSampleList
Direct Known Subclasses:
DistanceSampleList

public class DefaultSampleList
extends java.lang.Object

The class DefaultSampleList.java merges all calculated samples. it calculates sums and allowes direct access to the samplelists.

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

Constructor Summary
DefaultSampleList(PlayListProvider provider)
          Constructor
 
Method Summary
 void add(int index, java.lang.Integer value)
          adds the sample value of trackNO 'index'
 void addEmpty()
          adds the values for allready cosed streams (null entries)
 int getNormalizedSampleAt(int i)
          returns the normalized sample at position i
 int getNormalizedSampleSum()
          returns the sum of normalized sample
 int getSampleAt(int i)
          returns the sample at position i
 int getSampleSum()
          returns the sum of not normalized sample
 void reset()
          resets the instance
 int size()
          returns the number of samples
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSampleList

public DefaultSampleList(PlayListProvider provider)
Constructor

Parameters:
provider -
Method Detail

add

public void add(int index,
                java.lang.Integer value)
adds the sample value of trackNO 'index'

Parameters:
index -
value -

addEmpty

public void addEmpty()
adds the values for allready cosed streams (null entries)


getSampleSum

public int getSampleSum()
returns the sum of not normalized sample

Returns:
the sum of not normalized sample

getNormalizedSampleSum

public int getNormalizedSampleSum()
returns the sum of normalized sample

Returns:
the sum of normalized sample

getNormalizedSampleAt

public int getNormalizedSampleAt(int i)
returns the normalized sample at position i

Parameters:
i -
Returns:
the normalized sample at position i

getSampleAt

public int getSampleAt(int i)
returns the sample at position i

Parameters:
i -
Returns:
the sample at position i

size

public int size()
returns the number of samples

Returns:
the number of samples

reset

public void reset()
resets the instance