ALSA:PCM情報

snd_pcm_infoPCM の情報取得
操作
snd_pcm_info_sizeofサイズを取得
snd_pcm_info_mallocsnd_pcm_info_t 確保
snd_pcm_info_freesnd_pcm_info_t 解放
snd_pcm_info_copy複製
取得
snd_pcm_info_get_deviceデバイス番号の取得
snd_pcm_info_get_subdeviceサブデバイス番号の取得
snd_pcm_info_get_streamストリームの方向を取得
snd_pcm_info_get_cardカード番号を取得
snd_pcm_info_get_idID を取得
snd_pcm_info_get_name名前を取得
snd_pcm_info_get_subdevice_nameサブデバイス名を取得
snd_pcm_info_get_classクラスを取得
snd_pcm_info_get_subclassサブクラスを取得
snd_pcm_info_get_subdevices_countサブデバイス数を取得
snd_pcm_info_get_subdevices_avail有効なサブデバイス数を取得
snd_pcm_info_get_syncハードウェア同期 ID を取得
セット
snd_pcm_info_set_deviceデバイス番号をセット
snd_pcm_info_set_subdeviceサブデバイス番号をセット
snd_pcm_info_set_streamストリームタイプのセット
int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info);
PCM の情報取得
戻り値
0 で成功。負の値でエラーコード
操作
size_t snd_pcm_info_sizeof(void);
サイズを取得
int snd_pcm_info_malloc(snd_pcm_info_t **ptr);
snd_pcm_info_t 確保
戻り値
0 で成功。負の値でエラーコード
void snd_pcm_info_free(snd_pcm_info_t *obj);
snd_pcm_info_t 解放
void snd_pcm_info_copy(snd_pcm_info_t *dst, const snd_pcm_info_t *src);
複製
取得
unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj);
デバイス番号の取得
unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj);
サブデバイス番号の取得
snd_pcm_stream_t snd_pcm_info_get_stream(const snd_pcm_info_t *obj);
ストリームの方向を取得
戻り値
SND_PCM_STREAM_PLAYBACK, SND_PCM_STREAM_CAPTURE
int snd_pcm_info_get_card(const snd_pcm_info_t *obj);
カード番号を取得
戻り値
カード番号。
カードに関連付けられていない場合は、負のエラーコード。
const char *snd_pcm_info_get_id(const snd_pcm_info_t *obj);
ID を取得
const char *snd_pcm_info_get_name(const snd_pcm_info_t *obj);
名前を取得
const char *snd_pcm_info_get_subdevice_name(const snd_pcm_info_t *obj);
サブデバイス名を取得
snd_pcm_class_t snd_pcm_info_get_class(const snd_pcm_info_t *obj);
クラスを取得
戻り値
SND_PCM_CLASS_GENERIC標準デバイス
SND_PCM_CLASS_MULTIマルチチャンネル デバイス
SND_PCM_CLASS_MODEMソフトウェア モデム デバイス
SND_PCM_CLASS_DIGITIZERデジタイザーデバイス
snd_pcm_subclass_t snd_pcm_info_get_subclass(const snd_pcm_info_t *obj);
サブクラスを取得
戻り値
SND_PCM_SUBCLASS_GENERIC_MIXサブデバイスが混在している
SND_PCM_SUBCLASS_MULTI_MIXマルチチャンネル サブデバイスが混在している
unsigned int snd_pcm_info_get_subdevices_count(const snd_pcm_info_t *obj);
サブデバイス数を取得
unsigned int snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t *obj);
有効なサブデバイス数を取得
snd_pcm_sync_id_t snd_pcm_info_get_sync(const snd_pcm_info_t *obj);

typedef union _snd_pcm_sync_id {
    unsigned char id[16];
    unsigned short id16[8];
    unsigned int id32[4];
} snd_pcm_sync_id_t;
ハードウェア同期 ID を取得
戻り値
共用体データ
セット
void snd_pcm_info_set_device(snd_pcm_info_t *obj, unsigned int val);
デバイス番号をセット
void snd_pcm_info_set_subdevice(snd_pcm_info_t *obj, unsigned int val);
サブデバイス番号をセット
void snd_pcm_info_set_stream(snd_pcm_info_t *obj, snd_pcm_stream_t val);
ストリームタイプのセット
val
SND_PCM_STREAM_PLAYBACK, SND_PCM_STREAM_CAPTURE