Displaying 3 results from an estimated 3 matches for "opus_packet_get_samples_per_frame".
2019 Jul 15
0
How to enable OPUS inband FEC
...ecode the packet with decode_fec = 1 and then the same packet with decode_fec = 0:
In the code below, suggest to replace ‘ads->ch’ with ‘numChannels’ to make it more clear to what you refer to.)
if(packet_lost ) {
if(opus_packet_has_fec(buf, (opus_int32)len, sample_rate)) {
fec_samples = opus_packet_get_samples_per_frame(buf, sample_rate);
info("opus: there is fec packets=%d\n", fec_samples);
n = opus_decode(
ads->dec,
buf,
(opus_int32)len,
sampv,
fec_samples,
1);
if (n < 0) {
warning("opus: decode error: %s\n", opus_strerror(n));
return EPROTO;
}
n2 = opus_decode(
ads->de...
2012 Oct 19
3
How to cross-compile opus-tools?
...598: undefined reference to `opus_strerror'
src/opusenc.o:/home/user/source/opus-tools/src/opusenc.c:624: more undefined references to `opus_strerror' follow
src/diag_range.o: In function `opus_packet_parse_impl':
/home/user/source/opus-tools/src/diag_range.c:87: undefined reference to `opus_packet_get_samples_per_frame'
src/diag_range.o: In function `save_range':
/home/user/source/opus-tools/src/diag_range.c:237: undefined reference to `opus_packet_get_samples_per_frame'
/home/user/source/opus-tools/src/diag_range.c:239: undefined reference to `opus_packet_get_bandwidth'
collect2: error: ld return...
2015 Nov 05
3
Opusfile seeking bug
...split packet, 10 should do.
failingSeekPoint = m_lastGranulePos + (960*4) + 10;
break;
}
else if(packetOutRet == 1)
{
if(packet.packetno < 2)
continue;
// Calculate packet granule positions
fpp = opus_packet_get_nb_frames(packet.packet, packet.bytes);
spf = opus_packet_get_samples_per_frame(packet.packet, 48000);
spf *= fpp;
m_lastGranulePos += spf;
}
else
{
// Need more data or unrecoverable error.
packetsToFetch = 0;
}
firstPacketInPage = 0;
}
}
fclose(fp);
ogg_stream_clear(&m_streamState);
ogg_sync_clear(&m_syncState);
return failingS...