Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3868
  • 博文数量: 2
  • 博客积分: 1702
  • 博客等级: 上尉
  • 技术积分: 30
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-16 18:51
文章分类
文章存档

2010年(2)

最近访客

分类: LINUX

2010-12-16 18:54:28



src/modules/module-detect.c

1. run this function: "int pa__init(pa_module*m)"
"pa_bool_t just_one = FALSE;" allow more than 1 devices

need more info in "pulsecore/modargs.c", and I will study this later.

for ALSA,OSS,SOLARIS, each has different device node, so the have different codes.
and for WIN32, it does nothing except load module "module-waveout"

There only analyse ALSA.

#ifdef HAVE_ALSA--> use for alsa
"detect_alsa" function:

read info from this file "/proc/asound/devices", to get the device info.
in my PC, the file is:

------------>
  2:        : timer
  3:        : sequencer
  4: [ 0- 1]: digital audio playback
  5: [ 0- 0]: digital audio playback
  6: [ 0- 0]: digital audio capture
  7: [ 0- 2]: hardware dependent
  8: [ 0]   : control
<------------

This function "sscanf(line, " %*i: [%u- %u]: ", &device, &subdevice)" is so insteresting.

Use funtion: "pa_module_load()" to load: "module-alsa-sink", "module-alsa-source" the two modules

阅读(330) | 评论(0) | 转发(0) |
0

上一篇:围脖也能发日志

下一篇:没有了

给主人留下些什么吧!~~