as.clynx.audio.statistic
Class AbstractAnalyser

java.lang.Object
  extended by as.clynx.audio.statistic.AbstractAnalyser
Direct Known Subclasses:
MinMaxAnalyser, NoAnalyser, StdAnalyser

public abstract class AbstractAnalyser
extends java.lang.Object

The abstract class AbstractAnalyser.java is extended by all classes which analyse an audiofile for normalization. the result is a max and min value, which is passed to the normalizer.

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

Constructor Summary
AbstractAnalyser(javax.sound.sampled.AudioFormat format)
           
 
Method Summary
 void analyse(byte[] byteArray, int offset)
          analyses the bytearray of samplestream
 boolean canLoad(java.lang.String filename)
          sets the name of the audiofile. if was allready analysed: use the existing result. it returnes true when the file was allready analysed else false.
 int getMaximum()
          returns the upper boundary
 int getMaxSampleValue()
          returns the maximal possible sample value
 int getMinimum()
          returns the lower boundary
 int getMinSampleValue()
          returns the minimal possible sample value
 void save()
          saves the result of the analysis
 java.lang.String toString()
          returns all logged results
 void update(int source, java.lang.Object value)
          updates parameter in runtime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractAnalyser

public AbstractAnalyser(javax.sound.sampled.AudioFormat format)
Method Detail

canLoad

public boolean canLoad(java.lang.String filename)
sets the name of the audiofile. if was allready analysed: use the existing result. it returnes true when the file was allready analysed else false.

Parameters:
filename -
Returns:
true when the file was allready analysed else false.

analyse

public void analyse(byte[] byteArray,
                    int offset)
analyses the bytearray of samplestream

Parameters:
byteArray -
offset -

getMaxSampleValue

public int getMaxSampleValue()
returns the maximal possible sample value

Returns:
the maximal possible sample value

getMinSampleValue

public int getMinSampleValue()
returns the minimal possible sample value

Returns:
the minimal possible sample value

getMaximum

public int getMaximum()
returns the upper boundary

Returns:
the upper boundary

getMinimum

public int getMinimum()
returns the lower boundary

Returns:
the lower boundary

update

public void update(int source,
                   java.lang.Object value)
updates parameter in runtime

Parameters:
source -
value -

save

public void save()
saves the result of the analysis


toString

public java.lang.String toString()
returns all logged results

Overrides:
toString in class java.lang.Object
Returns:
the logged results