Package edu.tufts.hrilab.asr
Class ConfigurableMicrophone
java.lang.Object
edu.tufts.hrilab.asr.ConfigurableMicrophone
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurableMicrophone(float frameRate, int sampleSize, boolean signed, boolean bigEndian, int mixerID) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static intmatchMixer(String match) When provided a string, returns the mixer ID of the device that matches the name or description first.intread(byte[] buffer, int i) static voidvoidvoid
-
Constructor Details
-
ConfigurableMicrophone
public ConfigurableMicrophone(float frameRate, int sampleSize, boolean signed, boolean bigEndian, int mixerID)
-
-
Method Details
-
startRecording
public void startRecording() -
stopRecording
public void stopRecording() -
getStream
-
read
public int read(byte[] buffer, int i) -
close
public void close() -
showMixers
public static void showMixers() -
matchMixer
When provided a string, returns the mixer ID of the device that matches the name or description first. It also has the ability to match {} with anything.- Parameters:
match- String to match, where "{}" can match any substring- Returns:
- mixer ID if a match is found, -1 otherwise
-