mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Try to improve time estimation
This commit is contained in:
		
							parent
							
								
									123ba4f5f1
								
							
						
					
					
						commit
						6c10b106d8
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -642,13 +642,13 @@ filled_up:
 | 
			
		|||
             * This is the best time to estimate the playback position of the server */
 | 
			
		||||
            n = u->offset;
 | 
			
		||||
 | 
			
		||||
//#ifdef SIOCOUTQ
 | 
			
		||||
//           {
 | 
			
		||||
//               int l;
 | 
			
		||||
//               if (ioctl(u->fd, SIOCOUTQ, &l) >= 0 && l > 0)
 | 
			
		||||
//                   n -= l;
 | 
			
		||||
//           }
 | 
			
		||||
//#endif
 | 
			
		||||
#ifdef SIOCOUTQ
 | 
			
		||||
            {
 | 
			
		||||
                int l;
 | 
			
		||||
                if (ioctl(u->fd, SIOCOUTQ, &l) >= 0 && l > 0)
 | 
			
		||||
                    n -= l;
 | 
			
		||||
            }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
            usec = pa_bytes_to_usec(n, &u->sink->sample_spec);
 | 
			
		||||
            if (usec > u->latency)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue