From b3e2d47737948627fd5ce916cf6d96f4b2d75d94 Mon Sep 17 00:00:00 2001 From: Chun-Min Chang Date: Thu, 10 Feb 2022 16:15:40 +0000 Subject: [PATCH] Bug 1754615 - Remove default PreBufferFrames in AudioResampler r=padenot Depends on D138378 Differential Revision: https://phabricator.services.mozilla.com/D138379 --- dom/media/DynamicResampler.h | 2 +- dom/media/gtest/TestDynamicResampler.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/media/DynamicResampler.h b/dom/media/DynamicResampler.h index c5f00c1e2663..f97af2441da9 100644 --- a/dom/media/DynamicResampler.h +++ b/dom/media/DynamicResampler.h @@ -357,7 +357,7 @@ class AudioChunkList { class AudioResampler final { public: AudioResampler(uint32_t aInRate, uint32_t aOutRate, - uint32_t aPreBufferFrames = 0); + uint32_t aPreBufferFrames); /** * Append input data into the resampler internal buffer. Copy/move of the diff --git a/dom/media/gtest/TestDynamicResampler.cpp b/dom/media/gtest/TestDynamicResampler.cpp index 17af930de412..fd4fbde3dc3f 100644 --- a/dom/media/gtest/TestDynamicResampler.cpp +++ b/dom/media/gtest/TestDynamicResampler.cpp @@ -1274,7 +1274,7 @@ TEST(TestAudioResampler, ChannelChange_QuadToStereo) uint32_t in_rate = 24000; uint32_t out_rate = 48000; - AudioResampler dr(in_rate, out_rate); + AudioResampler dr(in_rate, out_rate, 0); AudioChunk stereoChunk = CreateAudioChunk(in_frames, 2, AUDIO_FORMAT_FLOAT32); @@ -1314,7 +1314,7 @@ TEST(TestAudioResampler, ChannelChange_Discontinuity) uint32_t in_frames = in_rate / 100; uint32_t out_frames = out_rate / 100; - AudioResampler dr(in_rate, out_rate); + AudioResampler dr(in_rate, out_rate, 0); AudioChunk monoChunk = CreateAudioChunk(in_frames, 1, AUDIO_FORMAT_FLOAT32);