mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	fix prototypes of remaining sbc.[ch] API regarding size_t/const
This commit is contained in:
		
							parent
							
								
									99dae9b1af
								
							
						
					
					
						commit
						d2bee57ee5
					
				
					 2 changed files with 13 additions and 7 deletions
				
			
		| 
						 | 
					@ -973,13 +973,15 @@ int sbc_init(sbc_t *sbc, unsigned long flags)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int sbc_parse(sbc_t *sbc, void *input, int input_len)
 | 
					ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return sbc_decode(sbc, input, input_len, NULL, 0, NULL);
 | 
						return sbc_decode(sbc, input, input_len, NULL, 0, NULL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
 | 
					ssize_t sbc_decode(sbc_t *sbc,
 | 
				
			||||||
		int output_len, int *written)
 | 
					               const void *input, size_t input_len,
 | 
				
			||||||
 | 
					               void *output, size_t output_len,
 | 
				
			||||||
 | 
					               size_t *written)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct sbc_priv *priv;
 | 
						struct sbc_priv *priv;
 | 
				
			||||||
	char *ptr;
 | 
						char *ptr;
 | 
				
			||||||
| 
						 | 
					@ -1020,7 +1022,7 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ptr = output;
 | 
						ptr = output;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (output_len < samples * priv->frame.channels * 2)
 | 
						if (output_len < (size_t) (samples * priv->frame.channels * 2))
 | 
				
			||||||
		samples = output_len / (priv->frame.channels * 2);
 | 
							samples = output_len / (priv->frame.channels * 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 0; i < samples; i++) {
 | 
						for (i = 0; i < samples; i++) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -82,9 +82,13 @@ typedef struct sbc_struct sbc_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int sbc_init(sbc_t *sbc, unsigned long flags);
 | 
					int sbc_init(sbc_t *sbc, unsigned long flags);
 | 
				
			||||||
int sbc_reinit(sbc_t *sbc, unsigned long flags);
 | 
					int sbc_reinit(sbc_t *sbc, unsigned long flags);
 | 
				
			||||||
int sbc_parse(sbc_t *sbc, void *input, int input_len);
 | 
					
 | 
				
			||||||
int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
 | 
					ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len);
 | 
				
			||||||
		int output_len, int *len);
 | 
					
 | 
				
			||||||
 | 
					ssize_t sbc_decode(sbc_t *sbc,
 | 
				
			||||||
 | 
					               const void *input, size_t input_len,
 | 
				
			||||||
 | 
					               void *output, size_t output_len,
 | 
				
			||||||
 | 
					               size_t *written);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Encodes ONE input block into ONE output block */
 | 
					/* Encodes ONE input block into ONE output block */
 | 
				
			||||||
ssize_t sbc_encode(sbc_t *sbc,
 | 
					ssize_t sbc_encode(sbc_t *sbc,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue