mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pw-cli: don't keep doing syncs in monitor mode
In monitor mode, we only need one sync to get the prompt and then we just wait until we need to stop. There is no need to keep on syncing because it consumes a lot of CPU. Patch by Hiero32 Fixes #2709
This commit is contained in:
		
							parent
							
								
									26e789124f
								
							
						
					
					
						commit
						bdfbce8939
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -2374,8 +2374,8 @@ int main(int argc, char *argv[])
 | 
				
			||||||
			fprintf(stderr, "Error: \"%s\"\n", error);
 | 
								fprintf(stderr, "Error: \"%s\"\n", error);
 | 
				
			||||||
			free(error);
 | 
								free(error);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		while (!data.quit && data.current) {
 | 
					 | 
				
			||||||
		data.current->prompt_pending = pw_core_sync(data.current->core, 0, 0);
 | 
							data.current->prompt_pending = pw_core_sync(data.current->core, 0, 0);
 | 
				
			||||||
 | 
							while (!data.quit && data.current) {
 | 
				
			||||||
			pw_main_loop_run(data.loop);
 | 
								pw_main_loop_run(data.loop);
 | 
				
			||||||
			if (!monitor)
 | 
								if (!monitor)
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue