OWLIFT Library for Android: OwliftMic クラス
OWLIFT Library for Android  1.8.0.0
Top Page
全メンバ一覧 | クラス | 公開メンバ関数

クラス

class  Buffer
 
interface  Callback
 

公開メンバ関数

 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 ()
 

詳解

Android端末のマイクのクラス

構築子と解体子

◆ OwliftMic()

コンストラクタ。

例外
OwliftException

メソッド詳解

◆ close()

void close ( )

端末のマイクを停止します。

◆ getChannels()

int getChannels ( )

チャンネル数を取得します。

戻り値
チャンネル数。

◆ getEncoding()

int getEncoding ( )

エンコーディング形式を取得します。

戻り値
android.media.AudioFormat.ENCODING_PCM_8BIT または android.media.AudioFormat.ENCODING_PCM_16BIT。

◆ getFrequency()

int getFrequency ( )

サンプリング周波数を取得します。

戻り値
サンプリング周波数。

◆ getNoiseReduction()

boolean getNoiseReduction ( )

ノイズ低減フィルタが有効かどうかを判断します。

戻り値
true : ノイズ低減フィルタが有効です。 false : ノイズ低減フィルタが無効です。

◆ getSubSampling()

int getSubSampling ( )

1サンプル・1チャンネル当たりのバイト数を取得します。

戻り値
1サンプル・1チャンネル当たりのバイト数。

◆ isMuted()

boolean isMuted ( )

ミュートを取得します。

戻り値
true : ミュート有効 、 false : ミュート無効。

◆ setMute()

void setMute ( boolean  b)

ミュートを設定します。
b に true を指定すると OwliftMediaRecorder で 録音する際、無音状態となります。

引数
btrue : ミュート有効 。 false : ミュート無効。

◆ setNoiseReduction()

void setNoiseReduction ( boolean  b)

ノイズ低減フィルタを設定します。
b に true を設定してから startInStream() を実行すると、ノイズ低減フィルタが有効になります。 ストリーミング中は切り替わりません。

引数
btrue : ノイズ低減フィルタを有効にします。 false : ノイズ低減フィルタを無効にします。

◆ startInStream()

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

集音を開始します。
ハードウェアの制約により、指定した freq、channels、subSampling 通りに設定されるとは限らないことに注意してください。 実際に使用される設定値を知るには、このメソッドを実行した後に、 getFrequency() などのメソッドで 値を取得してください。

引数
freqサンプリング周波数。
channelsチャンネル数。
subSampling1サンプル・1チャンネル当たりのバイト数。
cbコールバック用インターフェース。null可。
例外
OwliftException