mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add support for 32bit integer samples
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2037 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									3c17c7d442
								
							
						
					
					
						commit
						7e0f547f2f
					
				
					 12 changed files with 319 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -71,6 +71,16 @@ static void dump_block(const pa_sample_spec *ss, const pa_memchunk *chunk) {
 | 
			
		|||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        case PA_SAMPLE_S32NE:
 | 
			
		||||
        case PA_SAMPLE_S32RE: {
 | 
			
		||||
            uint32_t *u = d;
 | 
			
		||||
 | 
			
		||||
            for (i = 0; i < chunk->length / pa_frame_size(ss); i++)
 | 
			
		||||
                printf("0x%08x ", *(u++));
 | 
			
		||||
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        case PA_SAMPLE_FLOAT32NE:
 | 
			
		||||
        case PA_SAMPLE_FLOAT32RE: {
 | 
			
		||||
            float *u = d;
 | 
			
		||||
| 
						 | 
				
			
			@ -137,6 +147,23 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
 | 
			
		|||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        case PA_SAMPLE_S32NE:
 | 
			
		||||
        case PA_SAMPLE_S32RE: {
 | 
			
		||||
            uint32_t *u = d;
 | 
			
		||||
 | 
			
		||||
            u[0] = 0x00000001;
 | 
			
		||||
            u[1] = 0xFFFF0002;
 | 
			
		||||
            u[2] = 0x7FFF0003;
 | 
			
		||||
            u[3] = 0x80000004;
 | 
			
		||||
            u[4] = 0x9fff0005;
 | 
			
		||||
            u[5] = 0x3fff0006;
 | 
			
		||||
            u[6] =    0x10007;
 | 
			
		||||
            u[7] = 0xF0000008;
 | 
			
		||||
            u[8] =   0x200009;
 | 
			
		||||
            u[9] =   0x21000A;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        case PA_SAMPLE_FLOAT32NE:
 | 
			
		||||
        case PA_SAMPLE_FLOAT32RE: {
 | 
			
		||||
            float *u = d;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue