Class PumpProgressAdapter
- java.lang.Object
-
- com.tagtraum.audiokern.audioprocessor.PumpProgressAdapter
-
- All Implemented Interfaces:
SignalProcessor<AudioBuffer,Float>
public class PumpProgressAdapter extends Object implements SignalProcessor<AudioBuffer,Float>
Allows progress tracking ofSignalPump.pump()
. Just add an instance of this class toSignalPump.add(com.tagtraum.jipes.SignalProcessor)
and then addProgressListener
s usingaddProgressListener(com.tagtraum.core.ProgressListener)
.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description PumpProgressAdapter(int maxSamples)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProgressListener(ProgressListener progressListener)
<O2> SignalProcessor<Float,O2>
connectTo(SignalProcessor<Float,O2> floatO2SignalProcessor)
<O2> SignalProcessor<Float,O2>
disconnectFrom(SignalProcessor<Float,O2> floatO2SignalProcessor)
protected void
fireProgress(float percentDone)
void
flush()
SignalProcessor<Float,?>[]
getConnectedProcessors()
Object
getId()
Float
getOutput()
void
increment(int numberOfSamples)
void
process(AudioBuffer buffer)
String
toString()
-
-
-
Method Detail
-
addProgressListener
public void addProgressListener(ProgressListener progressListener)
-
fireProgress
protected void fireProgress(float percentDone)
-
connectTo
public <O2> SignalProcessor<Float,O2> connectTo(SignalProcessor<Float,O2> floatO2SignalProcessor)
- Specified by:
connectTo
in interfaceSignalProcessor<AudioBuffer,Float>
-
process
public void process(AudioBuffer buffer) throws IOException
- Specified by:
process
in interfaceSignalProcessor<AudioBuffer,Float>
- Throws:
IOException
-
increment
public void increment(int numberOfSamples) throws IOException
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceSignalProcessor<AudioBuffer,Float>
- Throws:
IOException
-
getOutput
public Float getOutput() throws IOException
- Specified by:
getOutput
in interfaceSignalProcessor<AudioBuffer,Float>
- Throws:
IOException
-
getId
public Object getId()
- Specified by:
getId
in interfaceSignalProcessor<AudioBuffer,Float>
-
disconnectFrom
public <O2> SignalProcessor<Float,O2> disconnectFrom(SignalProcessor<Float,O2> floatO2SignalProcessor)
- Specified by:
disconnectFrom
in interfaceSignalProcessor<AudioBuffer,Float>
-
getConnectedProcessors
public SignalProcessor<Float,?>[] getConnectedProcessors()
- Specified by:
getConnectedProcessors
in interfaceSignalProcessor<AudioBuffer,Float>
-
-