Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15374743
  • 博文数量: 2005
  • 博客积分: 11986
  • 博客等级: 上将
  • 技术积分: 22535
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-17 13:56
文章分类

全部博文(2005)

文章存档

2014年(2)

2013年(2)

2012年(16)

2011年(66)

2010年(368)

2009年(743)

2008年(491)

2007年(317)

分类: LINUX

2009-11-17 21:45:45

int snd_pcm_plugin_append(struct snd_pcm_plugin *plugin)
{
    // 将plugin追加到链表的结尾[luther.gliethttp]
    struct snd_pcm_runtime *runtime = plugin->plug->runtime;
    plugin->next = NULL;
    plugin->prev = runtime->oss.plugin_last;        // 添加的plugin->prev指向当前链表的结尾元素
    if (runtime->oss.plugin_last) {                 // 如果当前plugin非空
        runtime->oss.plugin_last->next = plugin;    // 将新plugin追加到当前last的next上
        runtime->oss.plugin_last = plugin;          // 新加入的plugin作为链表上的last
    } else {
        runtime->oss.plugin_last =
        runtime->oss.plugin_first = plugin;         // 当前链表还空,所以新加入的plugin既是first又是last.
    }
    return 0;
}

阅读(839) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~