mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	jack: always invoke buffer callback
Always pause processing until the main loop has processed the buffer change callback. This makes it less likely for clients in the same process to use a new buffersize before the other client has received the callback. In carla, one client is receiving the buffer size callback and the other clients are expexted to be paused until the callback for the client is completed.
This commit is contained in:
		
							parent
							
								
									fe417bd123
								
							
						
					
					
						commit
						b71f47448c
					
				
					 1 changed files with 2 additions and 6 deletions
				
			
		| 
						 | 
					@ -1228,12 +1228,8 @@ static inline int check_buffer_frames(struct client *c, struct spa_io_position *
 | 
				
			||||||
	if (SPA_UNLIKELY(buffer_frames != c->buffer_frames)) {
 | 
						if (SPA_UNLIKELY(buffer_frames != c->buffer_frames)) {
 | 
				
			||||||
		pw_log_info("%p: bufferframes old:%d new:%d cb:%p", c,
 | 
							pw_log_info("%p: bufferframes old:%d new:%d cb:%p", c,
 | 
				
			||||||
				c->buffer_frames, buffer_frames, c->bufsize_callback);
 | 
									c->buffer_frames, buffer_frames, c->bufsize_callback);
 | 
				
			||||||
		if (c->bufsize_callback != NULL || c->latency_callback != NULL) {
 | 
					 | 
				
			||||||
		pw_loop_invoke(c->context.l, do_buffer_frames, 0,
 | 
							pw_loop_invoke(c->context.l, do_buffer_frames, 0,
 | 
				
			||||||
				&buffer_frames, sizeof(buffer_frames), false, c);
 | 
									&buffer_frames, sizeof(buffer_frames), false, c);
 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			c->buffer_frames =  buffer_frames;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return c->buffer_frames == buffer_frames;
 | 
						return c->buffer_frames == buffer_frames;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue