|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class analyzes a sampled sound.
Method Summary | |
---|---|
void |
addAnalysisListener(AnalysisListener l)
Register the given listener for analysis events. |
int |
analyze(int beginIndex,
boolean printMessages)
Analyze the sample to generate a set of peaks. |
void |
cleanUp()
Clean up the state of the sample analyzer. |
void |
clearMessages(int index)
Clear errors during analysis. |
void |
debugBitMessage(int index,
java.lang.String message)
Record the message if debugging bit processing. |
void |
debugByteMessage(int index,
java.lang.String message)
Record the message if debugging byte processing. |
boolean |
debuggingBit(int index)
Determine whether the given level of debugging is enabled at the index. |
boolean |
debuggingByte(int index)
Determine whether the given level of debugging is enabled at the index. |
boolean |
debuggingWave(int index)
Determine whether the given level of debugging is enabled at the index. |
void |
debugWaveMessage(int index,
java.lang.String message)
Record the message if debugging wave processing. |
void |
error(int index,
java.lang.String message)
Record an error during analysis. |
int |
getBitEndIndex(int number)
Get the index of the end of the given bit number. |
void |
getBitNumber(int index,
int[] pos)
Get the bit number at the given position in the sample. |
int |
getBitStartIndex(int number)
Get the index of the start of the given bit number. |
int |
getBitValue(int index)
Get the bit value at the given position in the sample. |
int |
getByte(int bytePosition)
Get the byte value at the given byte position. |
int |
getByteIndex(int number)
Get the position in the sample of the given byte. |
int |
getByteNumber(int index)
Get the byte number at the given position in the sample. |
void |
getByteNumber(int index,
int[] pos)
Get the byte number at the given position in the sample. |
byte[] |
getBytes()
Get all the bytes. |
java.lang.String |
getByteValue(int index)
Get the byte value at the given position in the sample. |
int |
getFirstBitStartIndex()
Get the index of the start of the first bit found in the sample. |
int |
getFitValue(int index)
Get the fit value at the given position in the sample. |
int |
getLastBitEndIndex()
Get the index of the end of the last bit extracted from the sample. |
int |
getMessageIndex(int messageNumber)
Get the index of an message. |
Message[] |
getMessages()
Get the error and warning messages. |
int |
getNoiseThreshold(int index)
Get the noise threshold. |
int |
getNumBytes()
Get the number of bytes. |
int |
getWaveValue(int index)
Get the wave value at the given position in the sample. |
boolean |
isLoadComplete()
Checks whether loading is complete. |
boolean |
isMessageError(int messageNumber)
Identifies whether a message is an error or warning |
void |
loadCompleted()
Indicates that loading is complete. |
int |
numErrors()
Return the number of errors. |
int |
numMessages()
Return the total number of messages generated during analysis. |
int |
numWarnings()
Return the number of warnings. |
void |
printMessages()
Print out all error and warning messages. |
int |
redo(boolean printMessages)
Redo the last change to the sample. |
int |
setBitValue(int index,
int value,
boolean printMessages)
Set the bit value at the given position in the sample. |
int |
undo(boolean printMessages)
Undo the last change to the sample. |
void |
warning(int index,
java.lang.String message)
Record a warning during analysis. |
void |
write(java.io.OutputStream output)
Write the bytes that have been extraced from the sample to the output stream. |
Method Detail |
public int analyze(int beginIndex, boolean printMessages)
beginIndex
- The index within the sample to begin processing.printMessages
- Indicates whether to print messages after analysis.
public boolean isLoadComplete()
public void loadCompleted()
public void write(java.io.OutputStream output) throws java.io.IOException
output
- The output stream.
java.io.IOException
- An error occurred writing to the stream.public int getWaveValue(int index)
index
- The index of the sample.
public int getFitValue(int index)
index
- The index of the sample.
public int getBitValue(int index)
index
- The index.
public void getBitNumber(int index, int[] pos)
index
- The index.pos
- An array which will contain the bit number and offset from the start of the bit.public int getBitStartIndex(int number)
number
- The bit number.
public int getBitEndIndex(int number)
number
- The bit number.
public int setBitValue(int index, int value, boolean printMessages)
Causes re-analysis of the sample.
index
- The index.value
- The new bit value.printMessages
- Indicates whether to print messages after analysis.
public int undo(boolean printMessages)
printMessages
- Indicates whether to print messages after analysis.
public int redo(boolean printMessages)
printMessages
- Indicates whether to print messages after analysis.
public java.lang.String getByteValue(int index)
index
- The index.
public int getByteNumber(int index)
index
- The index.
public void getByteNumber(int index, int[] pos)
index
- The index.pos
- An array which will contain the byte number and offset from the start of the byte.public int getByte(int bytePosition)
bytePosition
- The index.
public byte[] getBytes()
public int getNumBytes()
public int getByteIndex(int number)
number
- The byte number.
public int getNoiseThreshold(int index)
index
- The index in the sample of the noise threshold value.
public int getFirstBitStartIndex()
public int getLastBitEndIndex()
public void warning(int index, java.lang.String message)
index
- The index of the error.message
- The warning message.public void error(int index, java.lang.String message)
index
- The index of the warning.message
- The error message.public void clearMessages(int index)
index
- The index from which to clear errors.public int numErrors()
public int getMessageIndex(int messageNumber)
messageNumber
- The message number.
public boolean isMessageError(int messageNumber)
messageNumber
- The message number.
public int numMessages()
public int numWarnings()
public void printMessages()
public Message[] getMessages()
public void cleanUp()
public void addAnalysisListener(AnalysisListener l)
l
- The listener.public void debugWaveMessage(int index, java.lang.String message)
index
- The index in the sample to which the message applies.message
- public void debugBitMessage(int index, java.lang.String message)
index
- The index in the sample to which the message applies.message
- public void debugByteMessage(int index, java.lang.String message)
index
- The index in the sample to which the message applies.message
- public boolean debuggingWave(int index)
index
- The index in the sample to which the message applies.
public boolean debuggingBit(int index)
index
- The index in the sample to which the message applies.
public boolean debuggingByte(int index)
index
- The index in the sample to which the message applies.
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |