|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alchemy.core.AlcMicrophone
public class AlcMicrophone
Base class used for microphone input
With very limited functionality at the moment to return a buffer or the current sound level
Based on code by Richard G. Baldwin from: http://www.developer.com/java/other/print.php/1572251
Constructor Summary | |
---|---|
AlcMicrophone(AlcMicInterface parent)
|
|
AlcMicrophone(AlcMicInterface parent,
int bufferSize)
Creates a new instance of AlcMicrophone |
|
AlcMicrophone(int bufferSize)
Creates a new instance of AlcMicrophone |
Method Summary | |
---|---|
void |
closeLine()
Close the mic line The line can be opened again by calling setBufer() or openLine() directly |
byte[] |
getBuffer()
Get the raw buffer |
double |
getMicLevel()
Get the current Microphone Level Based on an average value of the buffer |
int[] |
getSamples()
Get the Samples |
void |
openLine()
Open the mic line |
void |
setBuffer(int bufferSize)
Set the buffer to a certain size |
void |
start()
Starts Microphone Input |
void |
stop()
Stops Microphone Input |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlcMicrophone(int bufferSize)
bufferSize
- Size of the audio buffer - affects latencypublic AlcMicrophone(AlcMicInterface parent, int bufferSize)
parent
- Reference to the parent class implementing the AlcMicInterfacebufferSize
- Size of the required bufferpublic AlcMicrophone(AlcMicInterface parent)
Method Detail |
---|
public void setBuffer(int bufferSize)
bufferSize
- Size for the bufferpublic void openLine()
public void closeLine()
public void start()
public void stop()
public double getMicLevel()
public byte[] getBuffer()
public int[] getSamples()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |