mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sndfile: handle sndfiles with s24 format
Samples with s24 format should be read with the readf_int read function instead of the raw function. This fixes playback of flac/wav with s24 sample format. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/750>
This commit is contained in:
		
							parent
							
								
									3f9455411c
								
							
						
					
					
						commit
						3349e1c471
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -51,11 +51,11 @@ int pa_sndfile_read_sample_spec(SNDFILE *sf, pa_sample_spec *ss) {
 | 
				
			||||||
            ss->format = PA_SAMPLE_S16NE;
 | 
					            ss->format = PA_SAMPLE_S16NE;
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case SF_FORMAT_PCM_24:
 | 
					 | 
				
			||||||
            ss->format = PA_SAMPLE_S24NE;
 | 
					 | 
				
			||||||
            break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        case SF_FORMAT_PCM_32:
 | 
					        case SF_FORMAT_PCM_32:
 | 
				
			||||||
 | 
					        case SF_FORMAT_PCM_24:
 | 
				
			||||||
 | 
					            /* note that libsndfile will convert 24 bits samples to 32 bits
 | 
				
			||||||
 | 
					             * when using the sf_readf_int function, which will be selected
 | 
				
			||||||
 | 
					             * by setting the format to s32. */
 | 
				
			||||||
            ss->format = PA_SAMPLE_S32NE;
 | 
					            ss->format = PA_SAMPLE_S32NE;
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue