public class Zeropad<T extends AudioBuffer> extends Object implements SignalProcessor<T,T>
AudioBuffers at a given Zeropad.Position,
so that a desired total size is reached.| Modifier and Type | Class and Description |
|---|---|
static class |
Zeropad.Position |
| Constructor and Description |
|---|
Zeropad(Object id,
Zeropad.Position position,
int sizeAfterPadding) |
Zeropad(Zeropad.Position position,
int sizeAfterPadding) |
| Modifier and Type | Method and Description |
|---|---|
<O2> SignalProcessor<T,O2> |
connectTo(SignalProcessor<T,O2> signalProcessor)
Connects this processor to another processor to forward processed data to.
|
<O2> SignalProcessor<T,O2> |
disconnectFrom(SignalProcessor<T,O2> signalProcessor)
Disconnects a child processor.
|
boolean |
equals(Object o) |
void |
flush()
Asks to complete all pending operations.
|
SignalProcessor<T,?>[] |
getConnectedProcessors()
Lists all connected processors.
|
Object |
getId()
Arbitrary object to identify a processor.
|
T |
getOutput()
First calls
SignalProcessor.flush(), then returns the pending output, should there be any. |
int |
hashCode() |
void |
process(T buffer)
Asks this processor to work on the provided data and pipe the
output to the connected processors' own
SignalProcessor.process(Object) method.Implementing methods must not modify or hold on to the provided data. |
String |
toString() |
public Zeropad(Object id, Zeropad.Position position, int sizeAfterPadding)
public Zeropad(Zeropad.Position position, int sizeAfterPadding)
public void process(T buffer) throws IOException
SignalProcessorSignalProcessor.process(Object) method.Object.clone() method.
It is the responsibility of implementing classes to call the SignalProcessor.process(Object)
method of any connected processors. To manage connected processors classes may want
to use a SignalProcessorSupport instance.process in interface SignalProcessor<T extends AudioBuffer,T extends AudioBuffer>buffer - data to processIOException - if a processing error occursSignalProcessor.getConnectedProcessors()public void flush()
throws IOException
SignalProcessorSignalProcessor.flush() method.flush in interface SignalProcessor<T extends AudioBuffer,T extends AudioBuffer>IOException - if a processing error occurspublic T getOutput() throws IOException
SignalProcessorSignalProcessor.flush(), then returns the pending output, should there be any.
Note that this call may only succeed once to preserve memory.getOutput in interface SignalProcessor<T extends AudioBuffer,T extends AudioBuffer>null is returnedIOException - if a processing error occurspublic Object getId()
SignalProcessorSignalProcessor.getOutput().getId in interface SignalProcessor<T extends AudioBuffer,T extends AudioBuffer>SignalPump.pump()public <O2> SignalProcessor<T,O2> connectTo(SignalProcessor<T,O2> signalProcessor)
SignalProcessorconnectTo in interface SignalProcessor<T extends AudioBuffer,T extends AudioBuffer>O2 - output type of the processor we want to connect tosignalProcessor - processorSignalProcessor.disconnectFrom(SignalProcessor),
SignalProcessor.getConnectedProcessors(),
SignalPipelinepublic <O2> SignalProcessor<T,O2> disconnectFrom(SignalProcessor<T,O2> signalProcessor)
SignalProcessordisconnectFrom in interface SignalProcessor<T extends AudioBuffer,T extends AudioBuffer>O2 - output type of the processor we want to disconnect fromsignalProcessor - processorSignalProcessor.connectTo(SignalProcessor),
SignalProcessor.getConnectedProcessors()public SignalProcessor<T,?>[] getConnectedProcessors()
SignalProcessorgetConnectedProcessors in interface SignalProcessor<T extends AudioBuffer,T extends AudioBuffer>nullSignalProcessor.disconnectFrom(SignalProcessor),
SignalProcessor.connectTo(SignalProcessor)Copyright © 2011–2020 tagtraum industries incorporated. All rights reserved.