pcm_channels: added implementation for 32 bit samples
Some 24 bit code can be reused. The 32 bit variant has to use 64 bit integers, because 32 bit integers could overflow. This may be a performance hit on 32 bit CPUs.
This commit is contained in:
@@ -59,4 +59,21 @@ pcm_convert_channels_24(struct pcm_buffer *buffer,
|
||||
int8_t src_channels, const int32_t *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
|
||||
/**
|
||||
* Changes the number of channels in 32 bit PCM data.
|
||||
*
|
||||
* @param buffer the destination pcm_buffer object
|
||||
* @param dest_channels the number of channels requested
|
||||
* @param src_channels the number of channels in the source buffer
|
||||
* @param src the source PCM buffer
|
||||
* @param src_size the number of bytes in #src
|
||||
* @param dest_size_r returns the number of bytes of the destination buffer
|
||||
* @return the destination buffer
|
||||
*/
|
||||
const int32_t *
|
||||
pcm_convert_channels_32(struct pcm_buffer *buffer,
|
||||
int8_t dest_channels,
|
||||
int8_t src_channels, const int32_t *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user