aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm_utils.c')
-rw-r--r--src/pcm_utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index 5d315bdb3..bd7fc0482 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -560,6 +560,9 @@ size_t pcm_convert_size(const struct audio_format *inFormat, size_t src_size,
const int shift = 2 * outFormat->channels;
size_t dest_size = src_size;
+ /* no partial frames allowed */
+ assert((src_size % audio_format_frame_size(inFormat)) == 0);
+
switch (inFormat->bits) {
case 8:
dest_size <<= 1;