mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add new function pa_source_set_latency_range(), fix type of requested_latency
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2456 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									2e71f4d015
								
							
						
					
					
						commit
						9b44665c08
					
				
					 2 changed files with 22 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -786,4 +786,23 @@ void pa_source_invalidate_requested_latency(pa_source *s) {
 | 
			
		|||
 | 
			
		||||
    if (s->update_requested_latency)
 | 
			
		||||
        s->update_requested_latency(s);
 | 
			
		||||
 | 
			
		||||
    if (s->monitor_of)
 | 
			
		||||
        pa_sink_invalidate_requested_latency(s->monitor_of);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void pa_source_set_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t max_latency) {
 | 
			
		||||
    pa_source_assert_ref(s);
 | 
			
		||||
 | 
			
		||||
    if (min_latency == (pa_usec_t) -1)
 | 
			
		||||
        min_latency = DEFAULT_MIN_LATENCY;
 | 
			
		||||
 | 
			
		||||
    if (max_latency == (pa_usec_t) -1)
 | 
			
		||||
        max_latency = min_latency;
 | 
			
		||||
 | 
			
		||||
    pa_assert(!min_latency || !max_latency ||
 | 
			
		||||
              min_latency <= max_latency);
 | 
			
		||||
 | 
			
		||||
    s->min_latency = min_latency;
 | 
			
		||||
    s->max_latency = max_latency;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue