Advertisement

Android音频设备选择流程分析(下)

阅读量:

上篇对audio_route进行了分析,现在继续接续,也算是完成7月的作业,若再拖延便会错过本月的进度。

audio_route_apply_and_update_path这一流程可分为两个阶段,从函数名称便可得知,分别为apply和update:

audio_route_apply_path

复制代码
 /* Apply an audio route path by name */

    
 int audio_route_apply_path(struct audio_route *ar, const char *name)
    
 {
    
     struct mixer_path *path;
    
     ...
    
     path = path_get_by_name(ar, name);
    
     ...
    
     path_apply(ar, path);
    
     return 0;
    
 }
    
    
    
    

path被定义为一个结构体:

复制代码
 struct mixer_path {

    
     char *name;
    
     unsigned int size;
    
     unsigned int length;

全部评论 (0)

还没有任何评论哟~