pcm_resample: don't resample partial samples
Added assertions which ensure that there are no partial samples in the source buffer.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "log.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -75,6 +76,9 @@ pcm_resample_16(uint8_t channels,
|
||||
size_t data_out_size;
|
||||
int error;
|
||||
|
||||
assert((src_size % (sizeof(*src_buffer) * channels)) == 0);
|
||||
assert((dest_size % (sizeof(*dest_buffer) * channels)) == 0);
|
||||
|
||||
if (convalgo < 0)
|
||||
convalgo = pcm_resample_get_converter();
|
||||
|
||||
|
Reference in New Issue
Block a user