Changing the buffer size (slots) to 1.5 seconds @ 30 ms packets

This is a relanding of r5725, now with a fix for the failing tests.

BUG=2935
R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5738 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2014-03-20 15:09:38 +00:00
parent 979f1f8235
commit 3ab57c514c
2 changed files with 14 additions and 10 deletions

View File

@ -85,39 +85,43 @@ class InitialPlayoutDelayTest {
void NbMono() {
CodecInst codec;
AudioCodingModule::Codec("L16", &codec, 8000, 1);
Run(codec, 2000);
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
Run(codec, 1000);
}
void WbMono() {
CodecInst codec;
AudioCodingModule::Codec("L16", &codec, 16000, 1);
Run(codec, 2000);
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
Run(codec, 1000);
}
void SwbMono() {
CodecInst codec;
AudioCodingModule::Codec("L16", &codec, 32000, 1);
Run(codec, 1500); // NetEq buffer is not sufficiently large for 3 sec of
// PCM16 super-wideband.
codec.pacsize = codec.plfreq * 10 / 1000; // 10 ms packets.
Run(codec, 400); // Memory constraints limit the buffer at <500 ms.
}
void NbStereo() {
CodecInst codec;
AudioCodingModule::Codec("L16", &codec, 8000, 2);
Run(codec, 2000);
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
Run(codec, 1000);
}
void WbStereo() {
CodecInst codec;
AudioCodingModule::Codec("L16", &codec, 16000, 2);
Run(codec, 1500);
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
Run(codec, 1000);
}
void SwbStereo() {
CodecInst codec;
AudioCodingModule::Codec("L16", &codec, 32000, 2);
Run(codec, 600); // NetEq buffer is not sufficiently large for 3 sec of
// PCM16 super-wideband.
codec.pacsize = codec.plfreq * 10 / 1000; // 10 ms packets.
Run(codec, 400); // Memory constraints limit the buffer at <500 ms.
}
private:
@ -137,7 +141,7 @@ class InitialPlayoutDelayTest {
uint32_t timestamp = 0;
double rms = 0;
acm_a_->RegisterSendCodec(codec);
ASSERT_EQ(0, acm_a_->RegisterSendCodec(codec));
acm_b_->SetInitialPlayoutDelay(initial_delay_ms);
while (rms < kAmp / 2) {
in_audio_frame.timestamp_ = timestamp;

View File

@ -102,7 +102,7 @@ class NetEq {
kSyncPacketNotAccepted
};
static const int kMaxNumPacketsInBuffer = 240; // TODO(hlundin): Remove.
static const int kMaxNumPacketsInBuffer = 50; // TODO(hlundin): Remove.
static const int kMaxBytesInBuffer = 113280; // TODO(hlundin): Remove.
// Creates a new NetEq object, starting at the sample rate |sample_rate_hz|.