mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: handle prebuf better
prebuf == 0 should keep the read pointer updating prebuf > 0 should pause
This commit is contained in:
		
							parent
							
								
									98dab7903a
								
							
						
					
					
						commit
						d37742b410
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -1569,9 +1569,12 @@ static void stream_process(void *data)
 | 
				
			||||||
				pw_stream_flush(stream->stream, true);
 | 
									pw_stream_flush(stream->stream, true);
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				pd.underrun_for = size;
 | 
									pd.underrun_for = size;
 | 
				
			||||||
				pd.playing_for = size;
 | 
					 | 
				
			||||||
				pd.underrun = true;
 | 
									pd.underrun = true;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								if (stream->attr.prebuf == 0) {
 | 
				
			||||||
 | 
									pd.read_index += size;
 | 
				
			||||||
 | 
									spa_ringbuffer_read_update(&stream->ring, pd.read_index);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			if (avail > (int32_t)stream->attr.maxlength) {
 | 
								if (avail > (int32_t)stream->attr.maxlength) {
 | 
				
			||||||
				/* overrun, reported by other side, here we skip
 | 
									/* overrun, reported by other side, here we skip
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue