mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	echo-cancel: Add the WebRTC echo canceller
This adds the WebRTC echo canceller as another module-echo-cancel backend. We're exposing both the full echo canceller as well as the mobile echo control version as modargs. Pending items: 1. The mobile canceller doesn't seem to work at the moment. 2. We still need to add bits to hook in drift compensation (to support sink and source from different devices). The most controversial part of this patch would probably be the mandatory build-time dependency on a C++ compiler. If the optional --enable-webrtc-aec is set, then there's also a dependency on libstdc++.
This commit is contained in:
		
							parent
							
								
									dbe8f2e595
								
							
						
					
					
						commit
						6df6eb959e
					
				
					 5 changed files with 297 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -83,6 +83,9 @@ typedef enum {
 | 
			
		|||
    PA_ECHO_CANCELLER_INVALID = -1,
 | 
			
		||||
    PA_ECHO_CANCELLER_SPEEX = 0,
 | 
			
		||||
    PA_ECHO_CANCELLER_ADRIAN,
 | 
			
		||||
#ifdef HAVE_WEBRTC
 | 
			
		||||
    PA_ECHO_CANCELLER_WEBRTC,
 | 
			
		||||
#endif
 | 
			
		||||
} pa_echo_canceller_method_t;
 | 
			
		||||
 | 
			
		||||
#define DEFAULT_ECHO_CANCELLER "speex"
 | 
			
		||||
| 
						 | 
				
			
			@ -100,6 +103,14 @@ static const pa_echo_canceller ec_table[] = {
 | 
			
		|||
        .run                    = pa_adrian_ec_run,
 | 
			
		||||
        .done                   = pa_adrian_ec_done,
 | 
			
		||||
    },
 | 
			
		||||
#ifdef HAVE_WEBRTC
 | 
			
		||||
    {
 | 
			
		||||
        /* WebRTC's audio processing engine */
 | 
			
		||||
        .init                   = pa_webrtc_ec_init,
 | 
			
		||||
        .run                    = pa_webrtc_ec_run,
 | 
			
		||||
        .done                   = pa_webrtc_ec_done,
 | 
			
		||||
    },
 | 
			
		||||
#endif
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define DEFAULT_RATE 32000
 | 
			
		||||
| 
						 | 
				
			
			@ -1340,6 +1351,10 @@ static pa_echo_canceller_method_t get_ec_method_from_string(const char *method)
 | 
			
		|||
        return PA_ECHO_CANCELLER_SPEEX;
 | 
			
		||||
    else if (pa_streq(method, "adrian"))
 | 
			
		||||
        return PA_ECHO_CANCELLER_ADRIAN;
 | 
			
		||||
#ifdef HAVE_WEBRTC
 | 
			
		||||
    else if (pa_streq(method, "webrtc"))
 | 
			
		||||
        return PA_ECHO_CANCELLER_WEBRTC;
 | 
			
		||||
#endif
 | 
			
		||||
    else
 | 
			
		||||
        return PA_ECHO_CANCELLER_INVALID;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue