mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: aec: webrtc: Expose echo canceller mobile_mode
Significantly better CPU performance in lieu of canceller quality. Not implemented for 0.x series, as there's a lot more to enable there (such as routing modes), and I am hoping to drop support for those versions before too long.
This commit is contained in:
		
							parent
							
								
									477674740e
								
							
						
					
					
						commit
						eec1ac20b7
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -119,6 +119,9 @@ static int webrtc_init2(void *object, const struct spa_dict *args,
 | 
			
		|||
#elif defined(HAVE_WEBRTC1)
 | 
			
		||||
	bool voice_detection = webrtc_get_spa_bool(args, "webrtc.voice_detection", true);
 | 
			
		||||
	bool transient_suppression = webrtc_get_spa_bool(args, "webrtc.transient_suppression", true);
 | 
			
		||||
	bool mobile_mode = webrtc_get_spa_bool(args, "webrtc.mobile_mode", false);
 | 
			
		||||
#elif defined(HAVE_WEBRTC2)
 | 
			
		||||
	bool mobile_mode = webrtc_get_spa_bool(args, "webrtc.mobile_mode", false);
 | 
			
		||||
#endif
 | 
			
		||||
	// Note: AGC seems to mess up with Agnostic Delay Detection, especially with speech,
 | 
			
		||||
	// result in very poor performance, disable by default
 | 
			
		||||
| 
						 | 
				
			
			@ -171,6 +174,7 @@ static int webrtc_init2(void *object, const struct spa_dict *args,
 | 
			
		|||
#elif defined(HAVE_WEBRTC1)
 | 
			
		||||
	webrtc::AudioProcessing::Config config;
 | 
			
		||||
	config.echo_canceller.enabled = true;
 | 
			
		||||
	config.echo_canceller.mobile_mode = mobile_mode;
 | 
			
		||||
	config.pipeline.multi_channel_capture = rec_info->channels > 1;
 | 
			
		||||
	config.pipeline.multi_channel_render = play_info->channels > 1;
 | 
			
		||||
	// FIXME: Example code enables both gain controllers, but that seems sus
 | 
			
		||||
| 
						 | 
				
			
			@ -188,6 +192,7 @@ static int webrtc_init2(void *object, const struct spa_dict *args,
 | 
			
		|||
#elif defined(HAVE_WEBRTC2)
 | 
			
		||||
	webrtc::AudioProcessing::Config config;
 | 
			
		||||
	config.echo_canceller.enabled = true;
 | 
			
		||||
	config.echo_canceller.mobile_mode = mobile_mode;
 | 
			
		||||
	config.pipeline.multi_channel_capture = rec_info->channels > 1;
 | 
			
		||||
	config.pipeline.multi_channel_render = play_info->channels > 1;
 | 
			
		||||
	// FIXME: Example code enables both gain controllers, but that seems sus
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue