mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	make memblockq merge chunks
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@58 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									5ee3a59469
								
							
						
					
					
						commit
						025389693d
					
				
					 3 changed files with 14 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -82,6 +82,18 @@ void pa_memblockq_push(struct pa_memblockq* bq, const struct pa_memchunk *chunk,
 | 
			
		|||
    struct memblock_list *q;
 | 
			
		||||
    assert(bq && chunk && chunk->memblock && chunk->length && (chunk->length % bq->base) == 0);
 | 
			
		||||
 | 
			
		||||
    if (bq->blocks_tail && bq->blocks_tail->chunk.memblock == chunk->memblock) {
 | 
			
		||||
        /* Try to merge memory chunks */
 | 
			
		||||
 | 
			
		||||
        if (bq->blocks_tail->chunk.index+bq->blocks_tail->chunk.length == chunk->index) {
 | 
			
		||||
            bq->blocks_tail->chunk.length += chunk->length;
 | 
			
		||||
            bq->current_length += chunk->length;
 | 
			
		||||
 | 
			
		||||
    /*        fprintf(stderr, __FILE__": merge succeeded: %u\n", chunk->length);*/
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    q = malloc(sizeof(struct memblock_list));
 | 
			
		||||
    assert(q);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								src/todo
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								src/todo
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -9,8 +9,6 @@
 | 
			
		|||
 | 
			
		||||
- move more stuff from module-oss[-dma] to liboss-util
 | 
			
		||||
 | 
			
		||||
- merge memchunks in memblockq
 | 
			
		||||
 | 
			
		||||
- create libstatustext, libsocketutil
 | 
			
		||||
- prefix modules/libraries with pa_
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -29,6 +27,7 @@
 | 
			
		|||
- autoloading/autounloading
 | 
			
		||||
- slp/rendezvous
 | 
			
		||||
- doxygen
 | 
			
		||||
- make mcalign merge chunks
 | 
			
		||||
 | 
			
		||||
drivers:
 | 
			
		||||
- libao
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue