メインコンテンツまでスキップ
バージョン: 1.0.3

AudioFormatConst.BitDepth

パッケージ

com.nttqonoq.devices.android.mirzalibrary.data

Enum Class AudioFormatConst.BitDepth

継承ツリー


Object
 Enum<AudioFormatConst.BitDepth>
  com.nttqonoq.devices.android.mirzalibrary.data.AudioFormatConst.BitDepth

クラスの説明


public static enum AudioFormatConst.BitDepth
extends Enum<AudioFormatConst.BitDepth>

録音に使用するビット数

ネストされたクラスの概要


クラスから継承されたネストされたクラス/インターフェース
Enum.EnumDesc<E extends Enum<E>>

列挙型定数の概要


列挙型定数説明
BIT_DEPTH_1616ビット
BIT_DEPTH_2424ビット

メソッドの概要


修飾子とタイプメソッド説明
static intconvertBitDepth(int code)録音に使用するビット数ををAndroidのAudioFormatに変換
static intrevertBitDepth(int code)AndroidのAudioFormatから録音に使用するビット数に変換
static AudioFormatConst.BitDepthvalueOf(String name)指定された名前のこのクラスの列挙定数を返す
static AudioFormatConst.BitDepthvalues()この列挙型クラスの定数を、宣言された順序で含む配列を返す

列挙型定数の詳細


BIT_DEPTH_16
public static final AudioFormatConst.BitDepth BIT_DEPTH_16
16ビット
BIT_DEPTH_24
public static final AudioFormatConst.BitDepth BIT_DEPTH_24
24ビット

メソッドの詳細


values()

public static AudioFormatConst.BitDepth[] values()
この列挙型クラスの定数を、宣言された順序で含む配列を返す

戻り値:
この列挙型クラスの定数を宣言された順序で含む配列

valueOf

public static AudioFormatConst.BitDepth valueOf(String name)
指定された名前のこのクラスの列挙定数を返す。文字列は、このクラスで列挙定数を宣言するために使用された識別子と正確に一致しなければならない。 (余分な空白文字は許可されない。)

パラメータ:
name - 返される列挙型定数の名前
戻り値:
指定した名前の列挙型定数
例外:
IllegalArgumentException - この列挙型クラスに指定された名前の定数が存在しない場合
NullPointerException - 引数がnullの場合

convertBitDepth

public static int convertBitDepth(int code)

録音に使用するビット数ををAndroidのAudioFormatに変換

パラメータ:
code - 録音に使用するビット数。以下のいずれかを指定
・16: 16bit (AudioFormat.ENCODING_PCM_16BIT)
・24: 24bit (AudioFormat.ENCODING_PCM_24BIT_PACKED)
戻り値:
対応するAndroidFormat
例外:
IllegalArgumentException - サポートされていないcodeが渡された場合

revertBitDepth

public static int revertBitDepth(int code)

AndroidのAudioFormatから録音に使用するビット数に変換

パラメータ:
format - サポートされているAndroidのAudioFormat。以下のいずれかを指定
・AudioFormat.ENCODING_PCM_16BIT: 16ビット
・AudioFormat.ENCODING_PCM_24BIT_PACKED: 24ビット
戻り値:
録音に使用するビット数
例外:
IllegalArgumentException - サポートされていないformatが渡された場合