mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	optimize esound latency for xmms
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@73 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									710233bbf6
								
							
						
					
					
						commit
						b2405646d8
					
				
					 2 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
					@ -254,7 +254,7 @@ static int esd_proto_stream_play(struct connection *c, esd_proto_t request, cons
 | 
				
			||||||
    l = (size_t) (pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS); 
 | 
					    l = (size_t) (pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS); 
 | 
				
			||||||
    c->input_memblockq = pa_memblockq_new(l, 0, pa_sample_size(&ss), l/2, l/PLAYBACK_BUFFER_FRAGMENTS);
 | 
					    c->input_memblockq = pa_memblockq_new(l, 0, pa_sample_size(&ss), l/2, l/PLAYBACK_BUFFER_FRAGMENTS);
 | 
				
			||||||
    assert(c->input_memblockq);
 | 
					    assert(c->input_memblockq);
 | 
				
			||||||
    pa_iochannel_socket_set_rcvbuf(c->io, l/PLAYBACK_BUFFER_FRAGMENTS*5);
 | 
					    pa_iochannel_socket_set_rcvbuf(c->io, l/PLAYBACK_BUFFER_FRAGMENTS*2);
 | 
				
			||||||
    c->playback.fragment_size = l/10;
 | 
					    c->playback.fragment_size = l/10;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    assert(!c->sink_input);
 | 
					    assert(!c->sink_input);
 | 
				
			||||||
| 
						 | 
					@ -347,7 +347,7 @@ static int esd_proto_get_latency(struct connection *c, esd_proto_t request, cons
 | 
				
			||||||
        latency = 0;
 | 
					        latency = 0;
 | 
				
			||||||
    else {
 | 
					    else {
 | 
				
			||||||
        float usec = pa_sink_get_latency(sink);
 | 
					        float usec = pa_sink_get_latency(sink);
 | 
				
			||||||
        usec += PLAYBACK_BUFFER_SECONDS*1000000*.9;          /* A better estimation would be a good idea! */
 | 
					        usec += PLAYBACK_BUFFER_SECONDS*1000000;          /* A better estimation would be a good idea! */
 | 
				
			||||||
        latency = (int) ((usec*44100)/1000000);
 | 
					        latency = (int) ((usec*44100)/1000000);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					@ -561,7 +561,6 @@ static int do_read(struct connection *c) {
 | 
				
			||||||
                c->playback.memblock_index = 0;
 | 
					                c->playback.memblock_index = 0;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        if (!c->playback.current_memblock) {
 | 
					        if (!c->playback.current_memblock) {
 | 
				
			||||||
            c->playback.current_memblock = pa_memblock_new(c->playback.fragment_size*2);
 | 
					            c->playback.current_memblock = pa_memblock_new(c->playback.fragment_size*2);
 | 
				
			||||||
            assert(c->playback.current_memblock && c->playback.current_memblock->length >= l);
 | 
					            assert(c->playback.current_memblock && c->playback.current_memblock->length >= l);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								src/todo
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								src/todo
									
										
									
									
									
								
							| 
						 | 
					@ -1,5 +1,3 @@
 | 
				
			||||||
- xmms+esound latency testing
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- prefix modules/libraries with pa_
 | 
					- prefix modules/libraries with pa_
 | 
				
			||||||
- rename files
 | 
					- rename files
 | 
				
			||||||
- svn-id and license in every file
 | 
					- svn-id and license in every file
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue