全部博文(174)
分类: LINUX
2009-04-08 23:42:33
|
Opens a PCM. PCM handle 设备句柄 PCM stream (direction) 指的是PCM数据流的流向 |
snd_pcm_hw_params_malloc (&hw_params) The ALSA PCM device uses two groups of PCM related parameters. The hardware parameters contains the stream description like format, rate, count of channels, ring buffer size etc. The software parameters contains the software (driver) related parameters... PCM hardware configuration space container 硬件配置参数 |
access model format rate channel ... |
snd_pcm_hw_params_set_access ALSA knows about five access modes. The first three can be used for direct
communication. ...(关于前面三个选项略,我觉得是设置和其他程序通信的,名字中有MMAP,就是内存映射,应该只要关心后面2个,而且应该大都数都是INTERLEAVED的,所以没必要考虑太多。)The last two access modes describes
the read / write access methods. The
access represents the read / write interleaved access and the
represents the non-interleaved access. |
PCM sample format 参数列表就不给出了,libmad输出的应该是SND_PCM_FORMAT_S16_LE? |
snd_pcm_hw_params_set_rate_near 不使用..._set_rate的原因不是很清楚,但是这个函数的功能很明显。 Restrict a configuration space to have rate nearest to a target.
|
Restrict a configuration space to contain only one channels count.
|
|
|
|
|
|