mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	a2dp: try to completely process the queue
Continue processing the input data until we can't send anymore. When we are following another driver, we need to process each buffer in the cycle completely or we will start lagging behind.
This commit is contained in:
		
							parent
							
								
									b54571c5a1
								
							
						
					
					
						commit
						b8d65895c2
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -560,6 +560,7 @@ static int flush_data(struct impl *this, uint64_t now_time)
 | 
				
			||||||
	struct port *port = &this->port;
 | 
						struct port *port = &this->port;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	total_frames = 0;
 | 
						total_frames = 0;
 | 
				
			||||||
 | 
					again:
 | 
				
			||||||
	while (!spa_list_is_empty(&port->ready)) {
 | 
						while (!spa_list_is_empty(&port->ready)) {
 | 
				
			||||||
		uint8_t *src;
 | 
							uint8_t *src;
 | 
				
			||||||
		uint32_t n_bytes, n_frames;
 | 
							uint32_t n_bytes, n_frames;
 | 
				
			||||||
| 
						 | 
					@ -642,6 +643,8 @@ static int flush_data(struct impl *this, uint64_t now_time)
 | 
				
			||||||
			increase_bitpool(this);
 | 
								increase_bitpool(this);
 | 
				
			||||||
			this->last_error = now_time;
 | 
								this->last_error = now_time;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							if (!spa_list_is_empty(&port->ready))
 | 
				
			||||||
 | 
								goto again;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this->flush_source.mask = 0;
 | 
						this->flush_source.mask = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue