pcm_channels: num_channels is unsigned
You cannot have a negative number of channels, let's pass it as uint8_t instead of int8_t.
This commit is contained in:
parent
172a1dbdb9
commit
00ee3de7b2
@ -75,8 +75,8 @@ pcm_convert_channels_16_n_to_2(int16_t *dest,
|
||||
|
||||
const int16_t *
|
||||
pcm_convert_channels_16(struct pcm_buffer *buffer,
|
||||
int8_t dest_channels,
|
||||
int8_t src_channels, const int16_t *src,
|
||||
uint8_t dest_channels,
|
||||
uint8_t src_channels, const int16_t *src,
|
||||
size_t src_size, size_t *dest_size_r)
|
||||
{
|
||||
unsigned num_frames = src_size / src_channels / sizeof(*src);
|
||||
@ -149,8 +149,8 @@ pcm_convert_channels_24_n_to_2(int32_t *dest,
|
||||
|
||||
const int32_t *
|
||||
pcm_convert_channels_24(struct pcm_buffer *buffer,
|
||||
int8_t dest_channels,
|
||||
int8_t src_channels, const int32_t *src,
|
||||
uint8_t dest_channels,
|
||||
uint8_t src_channels, const int32_t *src,
|
||||
size_t src_size, size_t *dest_size_r)
|
||||
{
|
||||
unsigned num_frames = src_size / src_channels / sizeof(*src);
|
||||
@ -218,8 +218,8 @@ pcm_convert_channels_32_n_to_2(int32_t *dest,
|
||||
|
||||
const int32_t *
|
||||
pcm_convert_channels_32(struct pcm_buffer *buffer,
|
||||
int8_t dest_channels,
|
||||
int8_t src_channels, const int32_t *src,
|
||||
uint8_t dest_channels,
|
||||
uint8_t src_channels, const int32_t *src,
|
||||
size_t src_size, size_t *dest_size_r)
|
||||
{
|
||||
unsigned num_frames = src_size / src_channels / sizeof(*src);
|
||||
|
@ -38,8 +38,8 @@ struct pcm_buffer;
|
||||
*/
|
||||
const int16_t *
|
||||
pcm_convert_channels_16(struct pcm_buffer *buffer,
|
||||
int8_t dest_channels,
|
||||
int8_t src_channels, const int16_t *src,
|
||||
uint8_t dest_channels,
|
||||
uint8_t src_channels, const int16_t *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
|
||||
/**
|
||||
@ -56,8 +56,8 @@ pcm_convert_channels_16(struct pcm_buffer *buffer,
|
||||
*/
|
||||
const int32_t *
|
||||
pcm_convert_channels_24(struct pcm_buffer *buffer,
|
||||
int8_t dest_channels,
|
||||
int8_t src_channels, const int32_t *src,
|
||||
uint8_t dest_channels,
|
||||
uint8_t src_channels, const int32_t *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
|
||||
/**
|
||||
@ -73,8 +73,8 @@ pcm_convert_channels_24(struct pcm_buffer *buffer,
|
||||
*/
|
||||
const int32_t *
|
||||
pcm_convert_channels_32(struct pcm_buffer *buffer,
|
||||
int8_t dest_channels,
|
||||
int8_t src_channels, const int32_t *src,
|
||||
uint8_t dest_channels,
|
||||
uint8_t src_channels, const int32_t *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user