aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_resample_libsamplerate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm_resample_libsamplerate.c')
-rw-r--r--src/pcm_resample_libsamplerate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pcm_resample_libsamplerate.c b/src/pcm_resample_libsamplerate.c
index d4b85b811..fd778acc3 100644
--- a/src/pcm_resample_libsamplerate.c
+++ b/src/pcm_resample_libsamplerate.c
@@ -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();