mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	jack: remember last return from jack_get_buffer_size
Remember what we last returned from jack_get_buffer_size and only emit a buffersize change event when somwthing new is configured. Fixes startup of jconvolver. Fixes #1989
This commit is contained in:
		
							parent
							
								
									163c365340
								
							
						
					
					
						commit
						2b102a1046
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -1227,6 +1227,7 @@ do_buffer_frames(struct spa_loop *loop,
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	uint32_t buffer_frames = *((uint32_t*)data);
 | 
						uint32_t buffer_frames = *((uint32_t*)data);
 | 
				
			||||||
	struct client *c = user_data;
 | 
						struct client *c = user_data;
 | 
				
			||||||
 | 
						if (c->buffer_frames != buffer_frames)
 | 
				
			||||||
		do_callback_expr(c, c->buffer_frames = buffer_frames, bufsize_callback, buffer_frames, c->bufsize_arg);
 | 
							do_callback_expr(c, c->buffer_frames = buffer_frames, bufsize_callback, buffer_frames, c->bufsize_arg);
 | 
				
			||||||
	recompute_latencies(c);
 | 
						recompute_latencies(c);
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					@ -3985,6 +3986,7 @@ jack_nframes_t jack_get_buffer_size (jack_client_t *client)
 | 
				
			||||||
				res = c->position->clock.duration;
 | 
									res = c->position->clock.duration;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						c->buffer_frames = res;
 | 
				
			||||||
	pw_log_debug("buffer_frames: %u", res);
 | 
						pw_log_debug("buffer_frames: %u", res);
 | 
				
			||||||
	return res;
 | 
						return res;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue