mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	echo-cancel-test: Pass aec_args with module args
The echo canceller module can pass arguments to the EC implementation via the module parameter aec_args. However, the echo-cancel-test passes EC arguments via a separate argv[] option, which is inconsistent. Fix this.
This commit is contained in:
		
							parent
							
								
									8aa30049ec
								
							
						
					
					
						commit
						7eff884848
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -2140,7 +2140,7 @@ int main(int argc, char* argv[]) {
 | 
				
			||||||
        goto fail;
 | 
					        goto fail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!u.ec->init(u.core, u.ec, &source_ss, &source_map, &sink_ss, &sink_map, &nframes,
 | 
					    if (!u.ec->init(u.core, u.ec, &source_ss, &source_map, &sink_ss, &sink_map, &nframes,
 | 
				
			||||||
                     (argc > 5) ? argv[5] : NULL )) {
 | 
					                     pa_modargs_get_value(ma, "aec_args", NULL))) {
 | 
				
			||||||
        pa_log("Failed to init AEC engine");
 | 
					        pa_log("Failed to init AEC engine");
 | 
				
			||||||
        goto fail;
 | 
					        goto fail;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -2148,12 +2148,12 @@ int main(int argc, char* argv[]) {
 | 
				
			||||||
    u.sink_blocksize = nframes * pa_frame_size(&sink_ss);
 | 
					    u.sink_blocksize = nframes * pa_frame_size(&sink_ss);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (u.ec->params.drift_compensation) {
 | 
					    if (u.ec->params.drift_compensation) {
 | 
				
			||||||
        if (argc < 7) {
 | 
					        if (argc < 6) {
 | 
				
			||||||
            pa_log("Drift compensation enabled but drift file not specified");
 | 
					            pa_log("Drift compensation enabled but drift file not specified");
 | 
				
			||||||
            goto fail;
 | 
					            goto fail;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        u.drift_file = fopen(argv[6], "rt");
 | 
					        u.drift_file = fopen(argv[5], "rt");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (u.drift_file == NULL) {
 | 
					        if (u.drift_file == NULL) {
 | 
				
			||||||
            perror ("fopen failed");
 | 
					            perror ("fopen failed");
 | 
				
			||||||
| 
						 | 
					@ -2254,7 +2254,7 @@ out:
 | 
				
			||||||
    return ret;
 | 
					    return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
usage:
 | 
					usage:
 | 
				
			||||||
    pa_log("Usage: %s play_file rec_file out_file [module args] [aec_args] [drift_file]", argv[0]);
 | 
					    pa_log("Usage: %s play_file rec_file out_file [module args] [drift_file]", argv[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fail:
 | 
					fail:
 | 
				
			||||||
    ret = -1;
 | 
					    ret = -1;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue