org.mechio.api.audio.processing
Class MeanCalculator

java.lang.Object
  extended by org.mechio.api.audio.processing.MeanCalculator
All Implemented Interfaces:
SampleProcessor

public class MeanCalculator
extends Object
implements SampleProcessor

Author:
Matthew Stevenson

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mechio.api.audio.processing.SampleProcessor
SampleProcessor.ProcessorListener
 
Constructor Summary
MeanCalculator(int channels)
           
 
Method Summary
 void addProcessorListener(SampleProcessor.ProcessorListener listener)
           
protected  void fireProcessorUpdate(int count, int total)
           
 double getMean(int c)
           
 double getStd(int c)
           
 double normalize(int c, double x)
           
 void processSamples(double[][] samples, int frame, int total)
           
 void removeProcessorListener(SampleProcessor.ProcessorListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeanCalculator

public MeanCalculator(int channels)
Method Detail

addProcessorListener

public void addProcessorListener(SampleProcessor.ProcessorListener listener)
Specified by:
addProcessorListener in interface SampleProcessor

removeProcessorListener

public void removeProcessorListener(SampleProcessor.ProcessorListener listener)
Specified by:
removeProcessorListener in interface SampleProcessor

fireProcessorUpdate

protected void fireProcessorUpdate(int count,
                                   int total)

processSamples

public void processSamples(double[][] samples,
                           int frame,
                           int total)
Specified by:
processSamples in interface SampleProcessor

getMean

public double getMean(int c)

getStd

public double getStd(int c)

normalize

public double normalize(int c,
                        double x)


Copyright © 2011-2015. All Rights Reserved.