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:
parent
979f1f8235
commit
3ab57c514c
@ -85,39 +85,43 @@ class InitialPlayoutDelayTest {
|
|||||||
void NbMono() {
|
void NbMono() {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
AudioCodingModule::Codec("L16", &codec, 8000, 1);
|
AudioCodingModule::Codec("L16", &codec, 8000, 1);
|
||||||
Run(codec, 2000);
|
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
|
||||||
|
Run(codec, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WbMono() {
|
void WbMono() {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
AudioCodingModule::Codec("L16", &codec, 16000, 1);
|
AudioCodingModule::Codec("L16", &codec, 16000, 1);
|
||||||
Run(codec, 2000);
|
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
|
||||||
|
Run(codec, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwbMono() {
|
void SwbMono() {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
AudioCodingModule::Codec("L16", &codec, 32000, 1);
|
AudioCodingModule::Codec("L16", &codec, 32000, 1);
|
||||||
Run(codec, 1500); // NetEq buffer is not sufficiently large for 3 sec of
|
codec.pacsize = codec.plfreq * 10 / 1000; // 10 ms packets.
|
||||||
// PCM16 super-wideband.
|
Run(codec, 400); // Memory constraints limit the buffer at <500 ms.
|
||||||
}
|
}
|
||||||
|
|
||||||
void NbStereo() {
|
void NbStereo() {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
AudioCodingModule::Codec("L16", &codec, 8000, 2);
|
AudioCodingModule::Codec("L16", &codec, 8000, 2);
|
||||||
Run(codec, 2000);
|
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
|
||||||
|
Run(codec, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WbStereo() {
|
void WbStereo() {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
AudioCodingModule::Codec("L16", &codec, 16000, 2);
|
AudioCodingModule::Codec("L16", &codec, 16000, 2);
|
||||||
Run(codec, 1500);
|
codec.pacsize = codec.plfreq * 30 / 1000; // 30 ms packets.
|
||||||
|
Run(codec, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwbStereo() {
|
void SwbStereo() {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
AudioCodingModule::Codec("L16", &codec, 32000, 2);
|
AudioCodingModule::Codec("L16", &codec, 32000, 2);
|
||||||
Run(codec, 600); // NetEq buffer is not sufficiently large for 3 sec of
|
codec.pacsize = codec.plfreq * 10 / 1000; // 10 ms packets.
|
||||||
// PCM16 super-wideband.
|
Run(codec, 400); // Memory constraints limit the buffer at <500 ms.
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -137,7 +141,7 @@ class InitialPlayoutDelayTest {
|
|||||||
|
|
||||||
uint32_t timestamp = 0;
|
uint32_t timestamp = 0;
|
||||||
double rms = 0;
|
double rms = 0;
|
||||||
acm_a_->RegisterSendCodec(codec);
|
ASSERT_EQ(0, acm_a_->RegisterSendCodec(codec));
|
||||||
acm_b_->SetInitialPlayoutDelay(initial_delay_ms);
|
acm_b_->SetInitialPlayoutDelay(initial_delay_ms);
|
||||||
while (rms < kAmp / 2) {
|
while (rms < kAmp / 2) {
|
||||||
in_audio_frame.timestamp_ = timestamp;
|
in_audio_frame.timestamp_ = timestamp;
|
||||||
|
@ -102,7 +102,7 @@ class NetEq {
|
|||||||
kSyncPacketNotAccepted
|
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.
|
static const int kMaxBytesInBuffer = 113280; // TODO(hlundin): Remove.
|
||||||
|
|
||||||
// Creates a new NetEq object, starting at the sample rate |sample_rate_hz|.
|
// Creates a new NetEq object, starting at the sample rate |sample_rate_hz|.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user