Making multistream variable duration work for both the float and int API
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 1b41c65..c5fb366 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -185,6 +185,9 @@
unsigned char *data,
opus_int32 max_data_bytes,
int lsb_depth
+#ifndef FIXED_POINT
+ , downmix_func downmix
+#endif
)
{
opus_int32 Fs;
@@ -221,7 +224,7 @@
delay_compensation -= Fs/400;
#ifndef FIXED_POINT
LM = optimize_framesize(pcm, frame_size, channels, Fs, st->bitrate_bps,
- 0.f, st->subframe_mem, delay_compensation);
+ 0.f, st->subframe_mem, delay_compensation, downmix);
#endif
while ((Fs/400<<LM)>frame_size)
LM--;
@@ -410,7 +413,7 @@
)
{
return opus_multistream_encode_native(st, opus_copy_channel_in_float,
- pcm, frame_size, data, max_data_bytes, 24);
+ pcm, frame_size, data, max_data_bytes, 24, downmix_float);
}
int opus_multistream_encode(
@@ -422,7 +425,7 @@
)
{
return opus_multistream_encode_native(st, opus_copy_channel_in_short,
- pcm, frame_size, data, max_data_bytes, 16);
+ pcm, frame_size, data, max_data_bytes, 16, downmix_int);
}
#endif