Assert on uneven sample count

This commit is contained in:
OV2 2016-11-06 22:05:54 +01:00
parent a76837a4f2
commit 42f751da4a
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#define __HERMITE_RESAMPLER_H
#include "resampler.h"
#include <assert.h>
#undef CLAMP
#undef SHORT_CLAMP
@ -66,6 +67,7 @@ class HermiteResampler : public Resampler
void
read (short *data, int num_samples)
{
assert((num_samples & 1) == 0); // resampler always processes both stereo samples
int i_position = start >> 1;
int max_samples = buffer_size >> 1;
short *internal_buffer = (short *) buffer;