|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.sampled.fx.AbstractEffect
Abstract superclass for implementation of effects that don´t need analyzation of the audio data before they can process it
| Field Summary | |
|---|---|
private java.lang.String |
name
The effect name |
private boolean |
open
Indicates whether this effect is currently open or closed |
protected float |
sampleRate
The current sampleRate provided by the last call to open()
or startAnalysis() |
| Constructor Summary | |
|---|---|
AbstractEffect(java.lang.String name)
Construct a new effect |
|
| Method Summary | |
|---|---|
void |
analyze(java.nio.FloatBuffer[] in)
Analyze a buffer of audio data |
void |
close()
Close this Effect. |
abstract javax.sound.sampled.Control |
getControl(javax.sound.sampled.Control.Type type)
Get a Control of the desired type from this effect |
abstract javax.sound.sampled.Control[] |
getControls()
Get the set of Controls for manipulation of this effect´s parameters |
java.lang.String |
getName()
Get the name of this Effect |
boolean |
isAnalyzing()
Indicates whether this Effect is currently expecting calls to analyze() or not. |
abstract boolean |
isControlSupported(javax.sound.sampled.Control.Type type)
Ask this effect, if it supports a Control of the given type |
boolean |
isOpen()
Indicate, whether this effect is open and therefore ready for processing or not. |
abstract boolean |
isUndoable()
Ask this Effect, if it can provide an Undo-Effect |
boolean |
needsAnalysis()
Ask this Effect, if it needs to analyze the whole audio data before being able to process it |
void |
open(float sampleRate)
Start the effect processing with the given sample rate. |
abstract void |
process(java.nio.FloatBuffer[] in,
java.nio.FloatBuffer[] out)
Process a buffer of audio data. |
void |
startAnalysis(float sampleRate)
If this Effects needs to analyze the whole audio data before processing, an analyzation will be done before the processing. |
void |
stopAnalysis()
Indicate that the analyzation process has been finished and no more calls to analyze() are to be expected before the next call
to startAnalysis(). |
abstract Effect |
undoEffect()
If undo is supported, this method should return an Effect that can bring the processed audio data into the state it had before processing by applying it to the processed audio data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.String name
private boolean open
protected float sampleRate
open()
or startAnalysis()
| Constructor Detail |
|---|
public AbstractEffect(java.lang.String name)
name - The effect name| Method Detail |
|---|
public void analyze(java.nio.FloatBuffer[] in)
Effect
analyze in interface Effectin - Array of two FloatBuffers containing the audio data to be
analyzed for the left (index [0]) and the right (index [1]) channel.Effect.analyze(java.nio.FloatBuffer[])public void close()
Effectprocess() are to be
expected before the next call to open()
close in interface EffectEffect.close()public abstract javax.sound.sampled.Control getControl(javax.sound.sampled.Control.Type type)
Effect
getControl in interface Effecttype - The type of the Control
null.Effect.getControl(javax.sound.sampled.Control.Type)public abstract javax.sound.sampled.Control[] getControls()
Effect
getControls in interface EffectEffect.getControls()public java.lang.String getName()
Effect
getName in interface EffectEffect.getName()public boolean isAnalyzing()
Effectanalyze() or not.
isAnalyzing in interface EffectEffect.isAnalyzing()public abstract boolean isControlSupported(javax.sound.sampled.Control.Type type)
Effect
isControlSupported in interface Effecttype - The type of Control to ask for
Effect.isControlSupported(javax.sound.sampled.Control.Type)public boolean isOpen()
Effect
isOpen in interface EffectEffect.isOpen()public abstract boolean isUndoable()
Effect
isUndoable in interface EffectundoEffect() will return a valid Undo-Effect, false
otherwiseEffect.isUndoable()public boolean needsAnalysis()
Effect
needsAnalysis in interface EffectEffect.needsAnalysis()public void open(float sampleRate)
Effectprocess() and not necessarily by a final call to
close(). An Effect instance can be opened, closed and
re-opened unlimited times.
open in interface EffectsampleRate - The samplerate of the audio data to processEffect.open(float)
public abstract void process(java.nio.FloatBuffer[] in,
java.nio.FloatBuffer[] out)
Effect
process in interface Effectin - Array of two FloatBuffers containing the audio data to be
processed for the left (index [0]) and the right (index [1]) channel.out - Array of two FloatBuffers into which the processed audio
data should be written during this method.Effect.process(java.nio.FloatBuffer[], java.nio.FloatBuffer[])public void startAnalysis(float sampleRate)
Effectanalyze() and an optional final
call to stopAnalysis(). After finishing analyzation
open() to start processing. so an analyzing Effect is not
necessarily open.
startAnalysis in interface EffectsampleRate - The sample rate of the audio data to be analyzedEffect.startAnalysis(float)public void stopAnalysis()
Effectanalyze() are to be expected before the next call
to startAnalysis(). This method is optional.
stopAnalysis in interface EffectEffect.stopAnalysis()public abstract Effect undoEffect()
Effect
undoEffect in interface EffectEffect.undoEffect()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||