mirror of
https://github.com/haileys/bark
synced 2025-03-16 22:57:00 +00:00
do FEC properly in opus codec
This commit is contained in:
parent
4ccd209df7
commit
90fb076fff
2 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,7 @@ impl Decode for OpusDecoder {
|
|||
log::debug!("opus decode: bytes={} -> frames={}", bytes.len(), length);
|
||||
}
|
||||
None => {
|
||||
length = self.opus.decode_float(&[], out, false)?;
|
||||
length = self.opus.decode_float(&[], out, true)?;
|
||||
log::debug!("opus decode: correcting packet loss! frames={}", length);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -17,6 +17,7 @@ impl OpusEncoder {
|
|||
)?;
|
||||
|
||||
opus.set_inband_fec(true)?;
|
||||
opus.set_packet_loss_perc(50)?;
|
||||
|
||||
Ok(OpusEncoder { opus })
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue