mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	* rename "latency correction" to "write index correction"
* add read index invalidation code * rename "ipol_event" stuff to "auto_timing_update" * remove buffer_usec field from pa_timing_info, since it can be easily calculated from write_index and read_index anyway * add read_index_corrupt field to "pa_timing_info", similar to the already existing write_index_corrupt field * restart automatic timing update event every time a query is issued, not just when the last event elapsed * proper invalidation code for pa_stream_flush() * do tarsnport/sink/source latency correction for playback time only when device is not corked git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@686 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									77c2a1f561
								
							
						
					
					
						commit
						49b3150434
					
				
					 3 changed files with 217 additions and 135 deletions
				
			
		| 
						 | 
				
			
			@ -83,14 +83,14 @@ struct pa_context {
 | 
			
		|||
    pa_client_conf *conf;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define PA_MAX_LATENCY_CORRECTIONS 10
 | 
			
		||||
#define PA_MAX_WRITE_INDEX_CORRECTIONS 10
 | 
			
		||||
 | 
			
		||||
typedef struct pa_latency_correction {
 | 
			
		||||
typedef struct pa_index_correction {
 | 
			
		||||
    uint32_t tag;
 | 
			
		||||
    int valid;
 | 
			
		||||
    int64_t value;
 | 
			
		||||
    int absolute, corrupt;
 | 
			
		||||
} pa_latency_correction;
 | 
			
		||||
} pa_index_correction;
 | 
			
		||||
 | 
			
		||||
struct pa_stream {
 | 
			
		||||
    int ref;
 | 
			
		||||
| 
						 | 
				
			
			@ -124,13 +124,18 @@ struct pa_stream {
 | 
			
		|||
    /* Use to make sure that time advances monotonically */
 | 
			
		||||
    pa_usec_t previous_time;
 | 
			
		||||
    
 | 
			
		||||
    /* Latency correction stuff */
 | 
			
		||||
    pa_latency_correction latency_corrections[PA_MAX_LATENCY_CORRECTIONS];
 | 
			
		||||
    int idx_latency_correction;
 | 
			
		||||
    /* time updates with tags older than these are invalid */
 | 
			
		||||
    uint32_t write_index_not_before;
 | 
			
		||||
    uint32_t read_index_not_before;
 | 
			
		||||
 | 
			
		||||
    /* Data about individual timing update correctoins */
 | 
			
		||||
    pa_index_correction write_index_corrections[PA_MAX_WRITE_INDEX_CORRECTIONS];
 | 
			
		||||
    int current_write_index_correction;
 | 
			
		||||
 | 
			
		||||
    /* Latency interpolation stuff */
 | 
			
		||||
    pa_time_event *ipol_event;
 | 
			
		||||
    int ipol_requested;
 | 
			
		||||
    pa_time_event *auto_timing_update_event;
 | 
			
		||||
    int auto_timing_update_requested;
 | 
			
		||||
    
 | 
			
		||||
    pa_usec_t ipol_usec;
 | 
			
		||||
    int ipol_usec_valid;
 | 
			
		||||
    struct timeval ipol_timestamp;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue