mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	new configuration subsystem
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@198 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									fbefe67d52
								
							
						
					
					
						commit
						829656c5fc
					
				
					 23 changed files with 755 additions and 231 deletions
				
			
		| 
						 | 
				
			
			@ -347,12 +347,18 @@ static void stream_get_latency_callback(struct pa_pdispatch *pd, uint32_t comman
 | 
			
		|||
 | 
			
		||||
    gettimeofday(&now, NULL);
 | 
			
		||||
 | 
			
		||||
    if (pa_timeval_cmp(&local, &remote) < 0 && pa_timeval_cmp(&remote, &now))
 | 
			
		||||
    if (pa_timeval_cmp(&local, &remote) < 0 && pa_timeval_cmp(&remote, &now)) {
 | 
			
		||||
        /* local and remote seem to have synchronized clocks */
 | 
			
		||||
        i.transport_usec = pa_timeval_diff(&remote, &local);
 | 
			
		||||
    else
 | 
			
		||||
        i.synchronized_clocks = 1;
 | 
			
		||||
        i.timestamp = remote;
 | 
			
		||||
    } else {
 | 
			
		||||
        /* clocks are not synchronized, let's estimate latency then */
 | 
			
		||||
        i.transport_usec = pa_timeval_diff(&now, &local)/2;
 | 
			
		||||
        i.synchronized_clocks = 0;
 | 
			
		||||
        i.timestamp = local;
 | 
			
		||||
        pa_timeval_add(&i.timestamp, i.transport_usec);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (o->callback) {
 | 
			
		||||
        void (*cb)(struct pa_stream *s, const struct pa_latency_info *i, void *userdata) = o->callback;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue