OWLIFT Library for Android: OwliftMic Class Reference
OWLIFT Library for Android  1.8.0.0
Top Page
List of all members | Classes | Public Member Functions
OwliftMic Class Reference

Classes

class  Buffer
 
interface  Callback
 

Public Member Functions

 OwliftMic () throws OwliftException
 
int getFrequency ()
 
int getChannels ()
 
int getSubSampling ()
 
int getEncoding ()
 
boolean isMuted ()
 
void setMute (boolean b)
 
boolean getNoiseReduction ()
 
void setNoiseReduction (boolean b)
 
void startInStream (int freq, int channels, int subSampling, Callback cb) throws OwliftException
 
void close ()
 

Detailed Description

Microphone class.

Constructor & Destructor Documentation

◆ OwliftMic()

The constructor.

Exceptions
OwliftException

Member Function Documentation

◆ close()

void close ( )

Stops the MIC on terminal.

◆ getChannels()

int getChannels ( )

Returns the number of channels.

Returns
number of channels.

◆ getEncoding()

int getEncoding ( )

Returns the encoding format.

Returns
android.media.AudioFormat.ENCODING_PCM_8BIT or android.media.AudioFormat.ENCODING_PCM_16BIT.

◆ getFrequency()

int getFrequency ( )

Returns sampling frequency.

Returns
sampling frequency.

◆ getNoiseReduction()

boolean getNoiseReduction ( )

Tests if the noise reduction filter is enabled.

Returns
true : the noise reduction filter is enabled. false : the noise reduction filter is disabled.

◆ getSubSampling()

int getSubSampling ( )

Returns the number of byte per 1 sample/channel.

Returns
number of byte per 1 sample/channel.

◆ isMuted()

boolean isMuted ( )

Returns mute status.

Returns
true : mute, false : unmute.

◆ setMute()

void setMute ( boolean  b)

Sets mute.
No sounds recording in OwliftMediaRecorder if b sets true.

Parameters
btrue : mute, false : unmute.

◆ setNoiseReduction()

void setNoiseReduction ( boolean  b)

Sets noise reduction filter.
If b sets true before calling startInStream() , the noise reduction filter is enabled. It cannot be siwtched while streaming.

Parameters
btrue : Enables the noise reduction filter
false : Disables the noise reduction filter.

◆ startInStream()

void startInStream ( int  freq,
int  channels,
int  subSampling,
Callback  cb 
) throws OwliftException

Starts input sound streaming.
Note: due to hardware restriction, there is a possibility to be changed each parameters. To get current setting parameters, uses some methods ( for example, getFrequency()) after execute this method.

Parameters
freqsampling frequency.
channelsnumber of channels.
subSamplingnumber of byte per 1 sample/channel.
cbCallback. (null available).
Exceptions
OwliftException