mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	memblock: Add pa_memblock_acquire_chunk().
Besides making the code a bit cleaner, this also gets rid of a few "cast increases required alignment of target type" warnings.
This commit is contained in:
		
							parent
							
								
									33e5802df2
								
							
						
					
					
						commit
						3d6092bb0f
					
				
					 16 changed files with 52 additions and 40 deletions
				
			
		| 
						 | 
				
			
			@ -575,7 +575,7 @@ static void process_samples(struct userdata *u){
 | 
			
		|||
static void input_buffer(struct userdata *u, pa_memchunk *in){
 | 
			
		||||
    size_t fs = pa_frame_size(&(u->sink->sample_spec));
 | 
			
		||||
    size_t samples = in->length/fs;
 | 
			
		||||
    float *src = (float*) ((uint8_t*) pa_memblock_acquire(in->memblock) + in->index);
 | 
			
		||||
    float *src = pa_memblock_acquire_chunk(in);
 | 
			
		||||
    pa_assert(u->samples_gathered + samples <= u->input_buffer_max);
 | 
			
		||||
    for(size_t c = 0; c < u->channels; c++) {
 | 
			
		||||
        //buffer with an offset after the overlap from previous
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue