public class MultipleAudio extends MultipleChannel implements AsciiComm
Modifier and Type | Field and Description |
---|---|
static int |
CONTINUOUS_PROCESSING
The identifier for continuous processing.
|
static int |
FIXED_LENGTH_PROCESSING
The identifier for fixed length processing e.g.
|
int |
processingMode |
channelFormat
NOT_CONNECTED, NOT_READY, OUT_OF_RANGE
Constructor and Description |
---|
MultipleAudio()
Creates an empty MultipleAudio Object with no channels added.
|
MultipleAudio(int channels)
Creates a MultipleAudio object with a specific number of channels
|
Modifier and Type | Method and Description |
---|---|
ChannelFormat |
createChannelFormatFrom(java.lang.String line)
This function creates a ChannelFormat object from the given String using the toString and setFromString()
functions with a ChannelFormat
|
boolean |
equals(TrianaType obj)
Determines whether the argument TrianaType is equal to the current MultipleAudio.
|
AudioChannelFormat |
getAudioChannelFormat(int channelNo) |
javax.sound.sampled.AudioFormat |
getAudioFormat()
Gets a Javax.sound.sampled AudioFormat Object for this multiple audio object.
|
static int |
getNumberOfBitsToStore(double[] dataIn)
Finds the range for the given data and works out what sampling resolution it will fit into, e.g. CD
quality (16-bit resolution).
|
boolean |
isCompatible(TrianaType obj)
Tests the argument object to determine if it makes sense to perform arithmetic operations between it and the
current object.
|
void |
setDefaultAxisLabelling()
Added by I.
|
void |
setProcessingMode(int mode)
A function to set the type of processing mode that this data should be subjected to.
|
copyMe, copyParameters, getChannel, getChannelFormat, getChannelFormatContainer, getChannelImag, getChannelLength, getChannelLengthImag, getChannels, inputFromStream, outputToStream, setChannel, setChannel, setChannel, setChannel, setChannel, setChannelImag, setChannelImag, setChannelImag, setChannelImag, setChannelImag, setDimensions
add, addToTitle, convertDependentDataArraysToBytes, convertDependentDataArraysToDoubles, convertDependentDataArraysToFloats, convertDependentDataArraysToInts, convertDependentDataArraysToLongs, convertDependentDataArraysToShorts, copyData, copyLabels, divide, equals, getDataArrayClass, getDataArrayImag, getDataArrayImag, getDataArrayImagAsBytes, getDataArrayImagAsDoubles, getDataArrayImagAsFloats, getDataArrayImagAsInts, getDataArrayImagAsLongs, getDataArrayImagAsShorts, getDataArrayReal, getDataArrayReal, getDataArrayRealAsBytes, getDataArrayRealAsDoubles, getDataArrayRealAsFloats, getDataArrayRealAsInts, getDataArrayRealAsLongs, getDataArrayRealAsShorts, getDataArrayTypeNames, getDependentLabels, getDependentVariableDimensions, getDependentVariables, getDimensionLengths, getDimensionLengths, getGraphArrayImag, getGraphArrayImagLog10, getGraphArrayReal, getGraphArrayRealLog10, getIndependentArrayImag, getIndependentArrayReal, getIndependentLabels, getIndependentScaleImag, getIndependentScaleImagLog10, getIndependentScaleReal, getIndependentScaleRealLog10, getIndependentTriplet, getIndependentVariables, getLabels, getLabelsColumn, getTitle, isArithmeticArray, isArithmeticData, isCompatible, isDependentComplex, isIndependentComplex, isPrimitiveArray, isPrimitiveData, isTriplet, isUniform, maxDependentGraphingValuesImag, maxDependentGraphingValuesReal, maxDependentVariablesImag, maxDependentVariablesReal, maxIndependentScalesImag, maxIndependentScalesReal, maxIndependentVariablesImag, maxIndependentVariablesReal, minDependentGraphingValuesImag, minDependentGraphingValuesReal, minDependentVariablesImag, minDependentVariablesReal, minIndependentScalesImag, minIndependentScalesReal, minIndependentVariablesImag, minIndependentVariablesReal, multiply, resetDependent, resetIndependent, restrictToSubdomain, restrictToSubdomain, setDataArrayImag, setDataArrayReal, setDependentLabels, setDependentVariableDimensions, setDimensionLengths, setDimensionLengths, setIndependentArrayImag, setIndependentArrayReal, setIndependentLabels, setIndependentTriplet, setIndependentTriplet, setLabels, setTitle, subtract, testDataModel
containerSize, dataExists, deleteFromContainer, getDataContainer, getFromContainer, getSequenceNumber, insertIntoContainer, inspectDataContainer, setDataContainer, setSequenceNumber, updateObsoletePointers
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
inputFromStream, outputToStream
public static final int CONTINUOUS_PROCESSING
public static final int FIXED_LENGTH_PROCESSING
public int processingMode
public MultipleAudio()
public MultipleAudio(int channels)
public void setDefaultAxisLabelling()
setDefaultAxisLabelling
in class GraphType
public AudioChannelFormat getAudioChannelFormat(int channelNo)
public javax.sound.sampled.AudioFormat getAudioFormat()
public void setProcessingMode(int mode)
public static int getNumberOfBitsToStore(double[] dataIn)
dataIn
- The input data being examinedpublic ChannelFormat createChannelFormatFrom(java.lang.String line)
createChannelFormatFrom
in class MultipleChannel
public boolean isCompatible(TrianaType obj)
In Mutiple Audio, this method first tests for compatibility with superior classes, and then (if the input object is a Mutiple Audio) tests that the input has the same channel count.
Classes derived from this should over-ride this method with further tests as appropriate. The over-riding method should normally have the first lines
boolean test = super.isCompatible( obj );followed by other tests. If other types not subclassed from GraphType or Const should be allowed to be compatible then other tests must be implemented.
isCompatible
in class MultipleChannel
obj
- The data object to be compared with the current onepublic boolean equals(TrianaType obj)
This method must be over-ridden in derived types. In a derived type called xxx the method should begin
if ( !( obj instanceof xxx ) ) return false; if ( !isCompatible( obj ) ) return false;followed by tests that are specific to type xxx (testing its own parameters) and then as a last line
return super.equals( obj );This line invokes the other equals methods up the chain to GraphType. Each superior object tests its own parameters.
equals
in class MultipleChannel
obj
- The object being tested