|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.media.audio.dsp.AbstractAudio
public abstract class AbstractAudio
DOCUMENT ME!
| Field Summary | |
|---|---|
static int |
ALLTYPES
DOCUMENT ME! |
static int |
MONITOR
DOCUMENT ME! |
AbstractAudio |
next
DOCUMENT ME! |
static int |
NOTYPE
DOCUMENT ME! |
AbstractAudio |
previous
DOCUMENT ME! |
static int |
PROCESSOR
DOCUMENT ME! |
static int |
SAMPLEBUFFERSIZE
DOCUMENT ME! |
static int |
SINK
DOCUMENT ME! |
static int |
SOURCE
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
AbstractAudio(java.lang.String name,
int type)
AbstractAudio class constructor NOTE: name and type are for informational purposes only and serve to identify a specific device. |
|
| Method Summary | |
|---|---|
void |
doReset()
Called to perform a reset operation on all participating device stages. |
boolean |
equals(AbstractAudio a)
Function to determine if one AbstractAudio device is the same as another. |
boolean |
getByPass()
Return the current by pass state of this device. |
java.lang.String |
getName()
Return the name of this AbstractAudio device |
int |
getNumberOfChannels()
Retrieve the number of channel of the signal path. |
abstract int |
getSamples(short[] buffer,
int length)
This method must be iplemented by all devices that extend the AbstractAudio class. |
int |
getSamplingRate()
Retrieve the sample rate of the signal path. |
void |
hexo(int i)
Hex string display method |
static void |
hexo(long i)
Hex string display method |
void |
hexo(java.lang.String s,
int i)
Labeled hex string display method |
static void |
hexo(java.lang.String s,
long i)
Labeled hex string display method |
void |
minMaxChannels(int min,
int max,
int preferred)
Called to find the min, preferred and max values for the number of channels the devices in the signal path find acceptable. |
void |
minMaxSamplingRate(int min,
int max,
int preferred)
Called to find the min, preferred and max values for sample rate the devices in the signal path find acceptable. |
protected void |
negotiateNumberOfChannels()
Called to instigate number of channel negotiation in the signal chain of AbstractAudio device. |
protected void |
negotiateSamplingRate()
Called to instigate sample rate negotiation in the signal chain of AbstractAudio device. |
static void |
o(java.lang.String s)
Shortcut method for system.out.println |
protected void |
propagateReset()
Propagate reset call to all processing stages |
protected void |
reset()
Override this method if reset functionality is required for your AbstractAudio device derivative. |
void |
setByPass(boolean byPass)
Used to set the bypass state of this device |
void |
setChannelsRecursive(int ch)
Called to force the specified number of channels to be used in the device chain. |
protected void |
setNumberOfChannels(int channels)
Sets the number of channels for this device if possible |
protected void |
setSamplingRate(int s)
Sets the sample rate for this device if possible |
void |
setSamplingRateRecursive(int sr)
Causes all the device stages to have their sampling rate set to the specified value. |
java.lang.String |
toString()
Convert AbstractAudio parameters to a string for display |
static java.lang.String |
typeString(int type)
Static method for displaying a type string given the device type |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SAMPLEBUFFERSIZE
public static final int ALLTYPES
public static final int NOTYPE
public static final int SOURCE
public static final int PROCESSOR
public static final int MONITOR
public static final int SINK
public AbstractAudio previous
public AbstractAudio next
| Constructor Detail |
|---|
public AbstractAudio(java.lang.String name,
int type)
String - name is the name given to this deviceint - type is one of the device types listed above| Method Detail |
|---|
public static java.lang.String typeString(int type)
type - type is the type of this AbstractAudio device
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(AbstractAudio a)
a - DOCUMENT ME!
public java.lang.String getName()
getName in interface Named
public abstract int getSamples(short[] buffer,
int length)
buffer - [] buffer is a buffer that this stage of processing should
fill with data for subsequent return to calling code.length - length is the number of samples that are requested
public boolean getByPass()
public void setByPass(boolean byPass)
byPass - byPass if true stage will be bypassed.public int getSamplingRate()
protected void setSamplingRate(int s)
s - s is the sample rate to setprotected void negotiateSamplingRate()
public void minMaxSamplingRate(int min,
int max,
int preferred)
min - min is the wrapped minimum value of sampling rate this signal
path can tolerate.max - max is the wrapped maximum value of sampling rate this signal
path can tolerate.preferred - preferred is the wrapped sampling rate value this
signal path prefers.public void setSamplingRateRecursive(int sr)
sr - sr is the sampling rate that was negotiated and needs
therefore to be set into each stage.public int getNumberOfChannels()
protected void setNumberOfChannels(int channels)
channels - channels is the number of channels to setprotected void negotiateNumberOfChannels()
public void minMaxChannels(int min,
int max,
int preferred)
min - min is the wrapped minimum number of channels this signal
path can tolerate.max - max is the wrapped maximum number of channels this signal
path can tolerate.preferred - preferred is the wrapped number of channels this signal
path prefers.public void setChannelsRecursive(int ch)
ch - ch is the number of channels to set either 1 for mono or 2 for
stereo.protected void reset()
protected void propagateReset()
public void doReset()
public void hexo(int i)
i - i is the value to convert to a hex string
public void hexo(java.lang.String s,
int i)
s - s is the label to prepend to the hex stringi - i is the value to convert to a hex stringpublic static void hexo(long i)
i - i is the value to convert to a hex string
public static void hexo(java.lang.String s,
long i)
s - s is the label to prepend to the hex stringi - i is the value to convert to a hex stringpublic static void o(java.lang.String s)
s - s is the string to write to standard out
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||