Index: webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc |
diff --git a/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc b/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc |
index 4ccebb3e66e84426182a4e9d9ffc07c04f6d001a..2ebd1927bc4de2197656ca4e6fac33a6d843aeea 100644 |
--- a/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc |
+++ b/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc |
@@ -44,7 +44,7 @@ class NetEqIsacQualityTest : public NetEqQualityTest { |
void SetUp() override; |
void TearDown() override; |
virtual int EncodeBlock(int16_t* in_data, size_t block_size_samples, |
- uint8_t* payload, size_t max_bytes); |
+ rtc::Buffer* payload, size_t max_bytes); |
private: |
ISACFIX_MainStruct* isac_encoder_; |
int bit_rate_kbps_; |
@@ -78,7 +78,7 @@ void NetEqIsacQualityTest::TearDown() { |
int NetEqIsacQualityTest::EncodeBlock(int16_t* in_data, |
size_t block_size_samples, |
- uint8_t* payload, size_t max_bytes) { |
+ rtc::Buffer* payload, size_t max_bytes) { |
// ISAC takes 10 ms for every call. |
const int subblocks = kIsacBlockDurationMs / 10; |
const int subblock_length = 10 * kIsacInputSamplingKhz; |
@@ -89,7 +89,11 @@ int NetEqIsacQualityTest::EncodeBlock(int16_t* in_data, |
// The Isac encoder does not perform encoding (and returns 0) until it |
// receives a sequence of sub-blocks that amount to the frame duration. |
EXPECT_EQ(0, value); |
- value = WebRtcIsacfix_Encode(isac_encoder_, &in_data[pointer], payload); |
+ payload->AppendData(max_bytes, [&] (rtc::ArrayView<uint8_t> payload) { |
+ value = WebRtcIsacfix_Encode(isac_encoder_, &in_data[pointer], |
+ payload.data()); |
+ return (value >= 0) ? static_cast<size_t>(value) : 0; |
+ }); |
} |
EXPECT_GT(value, 0); |
return value; |