Adding three frame sizes to Opus

Adding support for 10, 40 and 60 ms packet sizes for Opus.

BUG=issue1015

Review URL: https://webrtc-codereview.appspot.com/1086004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3454 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tina.legrand@webrtc.org
2013-02-01 14:20:06 +00:00
parent d087789b9c
commit 46d90dcd74
6 changed files with 52 additions and 36 deletions

View File

@ -286,7 +286,7 @@ const ACMCodecDB::CodecSettings ACMCodecDB::codec_settings_[] = {
// Opus supports frames shorter than 10ms,
// but it doesn't help us to use them.
// Mono and stereo.
{1, {960}, 0, 2},
{4, {480, 960, 1920, 2880}, 0, 2},
#endif
#ifdef WEBRTC_CODEC_SPEEX
{3, {160, 320, 480}, 0, 1},

View File

@ -36,8 +36,8 @@ namespace webrtc {
// 60 ms is the maximum block size we support. An extra 20 ms is considered
// for safety if process() method is not called when it should be, i.e. we
// accept 20 ms of jitter. 80 ms @ 32 kHz (super wide-band) is 2560 samples.
#define AUDIO_BUFFER_SIZE_W16 2560
// accept 20 ms of jitter. 80 ms @ 48 kHz (full-band) stereo is 7680 samples.
#define AUDIO_BUFFER_SIZE_W16 7680
// There is one timestamp per each 10 ms of audio
// the audio buffer, at max, may contain 32 blocks of 10ms

View File

@ -108,7 +108,8 @@ ACMOpus::ACMOpus(int16_t codec_id)
bitrate_(20000), // Default bit-rate.
channels_(1) { // Default mono
codec_id_ = codec_id;
// Opus has internal DTX, but we dont use it for now.
// Opus has internal DTX, but we don't use it for now.
has_internal_dtx_ = false;
if (codec_id_ != ACMCodecDB::kOpus) {