[opus] opus_multistream_encode_float not working in libopus 1.1

Alpha Thinktink
Wed, 04 Jun 2014 22:48:30 -0000

Finally got it to compile and attach the MSVC debugger.

It fails at the following:
    if ((!st->variable_duration && 400*frame_size != st->Fs
&&
200*frame_size != st->Fs && 100*frame_size != st->Fs &&
         50*frame_size != st->Fs &&  25*frame_size != st->Fs
&&
50*frame_size != 3*st->Fs)
         || (400*frame_size < st->Fs)
         || max_data_bytes<=0
         )
    {
       RESTORE_STACK;
       return OPUS_BAD_ARG;
    }
---inside---
opus_encode_native(...)

---on---
line 970 inside opus_encoder.c

---where the debugger says---
!st->variable_duration evaluates as false
400*frame_size != st->Fs evaluates as true
200*frame_size != st->Fs evaluates as true
100*frame_size != st->Fs evaluates as true
50*frame_size != st->Fs evaluates as false
25*frame_size != st->Fs evaluates as true
50*frame_size != 3*st->Fs evaluates as true
(400*frame_size < st->Fs) evaluates as true
max_data_bytes<=0 evaluates as true

---variables values involved---
st->variable_duration=5000
frame_size=960
st->Fs=48000
max_data_bytes=-11


Hope that helps.