|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectprojectpossibility.CMatchableSound
public class CMatchableSound
A previously recorded sound which can match itself against the incoming audio stream and generate an alert to the user. This initial implementation uses a simple matching scheme and can only handle constant frequency sounds. Later revisions will probably include more sophisticated functionality.
| Constructor Summary | |
|---|---|
CMatchableSound(java.lang.String name,
javax.microedition.lcdui.Display display)
Construct a new matchable sound |
|
| Method Summary | |
|---|---|
boolean |
checkMatch(double loudestFreq)
Analyze the dominant frequency in the current sound stream and generate an alert if it is a match. |
java.lang.String |
getName()
Get the sound's name |
boolean |
isEnabled()
Determine whether or not the sound is currently enabled |
void |
setEnabled(boolean enabled)
Set the enabled status of the sound |
void |
setFrequency(double freq)
Set the dominant frequency of the sound |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CMatchableSound(java.lang.String name,
javax.microedition.lcdui.Display display)
name - The name of the sounddisplay - The display object that should be alerted when the sound is detected| Method Detail |
|---|
public void setFrequency(double freq)
freq - The frequency to setpublic java.lang.String getName()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - true if the sound should be enabled, false otherwisepublic boolean checkMatch(double loudestFreq)
loudestFreq - The loudest frequency in the current waveform
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||