I'm trying to use the opus Forward Error Correction (FEC) feature. I have a service which does the encoding with OPUS_SET_INBAND_FEC(1) and OPUS_SET_PACKET_LOSS_PERC(20) with 10ms packets and sends them over UDP.
I'm not clear on the decoding process though.
- When a packet is lost, do I need to call decode with fec=1 ONLY or do I need to call decode with fec=0 after as well on the next packet?
- How do I know up front the size of the pcm that I send to decode with fec enabled?