Remove useless AudioProcessing::Create() overload.
R=aluebs@webrtc.org Review URL: https://webrtc-codereview.appspot.com/36739004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8046 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
16825b1a82
commit
46323b3786
@ -39,7 +39,7 @@ class AgcManagerTest : public ::testing::Test {
|
|||||||
manager_(new AgcManager(VoEExternalMedia::GetInterface(voe_),
|
manager_(new AgcManager(VoEExternalMedia::GetInterface(voe_),
|
||||||
VoEVolumeControl::GetInterface(voe_),
|
VoEVolumeControl::GetInterface(voe_),
|
||||||
agc_,
|
agc_,
|
||||||
AudioProcessing::Create(0))),
|
AudioProcessing::Create())),
|
||||||
channel_(-1) {
|
channel_(-1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ void RunAgc() {
|
|||||||
FakeVoEExternalMedia media;
|
FakeVoEExternalMedia media;
|
||||||
MockVoEVolumeControl volume;
|
MockVoEVolumeControl volume;
|
||||||
Agc* agc = new Agc;
|
Agc* agc = new Agc;
|
||||||
AudioProcessing* audioproc = AudioProcessing::Create(0);
|
AudioProcessing* audioproc = AudioProcessing::Create();
|
||||||
ASSERT_TRUE(audioproc != NULL);
|
ASSERT_TRUE(audioproc != NULL);
|
||||||
AgcManager manager(&media, &volume, agc, audioproc);
|
AgcManager manager(&media, &volume, agc, audioproc);
|
||||||
|
|
||||||
|
@ -136,10 +136,6 @@ class GainControlForNewAgc : public GainControl, public VolumeCallbacks {
|
|||||||
int volume_;
|
int volume_;
|
||||||
};
|
};
|
||||||
|
|
||||||
AudioProcessing* AudioProcessing::Create(int id) {
|
|
||||||
return Create();
|
|
||||||
}
|
|
||||||
|
|
||||||
AudioProcessing* AudioProcessing::Create() {
|
AudioProcessing* AudioProcessing::Create() {
|
||||||
Config config;
|
Config config;
|
||||||
return Create(config);
|
return Create(config);
|
||||||
|
@ -19,7 +19,7 @@ extern "C" {
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
TEST(EchoCancellationInternalTest, DelayCorrection) {
|
TEST(EchoCancellationInternalTest, DelayCorrection) {
|
||||||
scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(0));
|
scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
|
||||||
EXPECT_TRUE(ap->echo_cancellation()->aec_core() == NULL);
|
EXPECT_TRUE(ap->echo_cancellation()->aec_core() == NULL);
|
||||||
|
|
||||||
EXPECT_EQ(ap->kNoError, ap->echo_cancellation()->Enable(true));
|
EXPECT_EQ(ap->kNoError, ap->echo_cancellation()->Enable(true));
|
||||||
@ -49,7 +49,7 @@ TEST(EchoCancellationInternalTest, DelayCorrection) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(EchoCancellationInternalTest, ReportedDelay) {
|
TEST(EchoCancellationInternalTest, ReportedDelay) {
|
||||||
scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(0));
|
scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
|
||||||
EXPECT_TRUE(ap->echo_cancellation()->aec_core() == NULL);
|
EXPECT_TRUE(ap->echo_cancellation()->aec_core() == NULL);
|
||||||
|
|
||||||
EXPECT_EQ(ap->kNoError, ap->echo_cancellation()->Enable(true));
|
EXPECT_EQ(ap->kNoError, ap->echo_cancellation()->Enable(true));
|
||||||
|
@ -199,8 +199,6 @@ class AudioProcessing {
|
|||||||
static AudioProcessing* Create();
|
static AudioProcessing* Create();
|
||||||
// Allows passing in an optional configuration at create-time.
|
// Allows passing in an optional configuration at create-time.
|
||||||
static AudioProcessing* Create(const Config& config);
|
static AudioProcessing* Create(const Config& config);
|
||||||
// TODO(ajm): Deprecated; remove all calls to it.
|
|
||||||
static AudioProcessing* Create(int id);
|
|
||||||
virtual ~AudioProcessing() {}
|
virtual ~AudioProcessing() {}
|
||||||
|
|
||||||
// Initializes internal states, while retaining all user settings. This
|
// Initializes internal states, while retaining all user settings. This
|
||||||
|
@ -432,7 +432,7 @@ int VoEBaseImpl::Init(AudioDeviceModule* external_adm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!audioproc) {
|
if (!audioproc) {
|
||||||
audioproc = AudioProcessing::Create(VoEId(_shared->instance_id(), -1));
|
audioproc = AudioProcessing::Create();
|
||||||
if (!audioproc) {
|
if (!audioproc) {
|
||||||
LOG(LS_ERROR) << "Failed to create AudioProcessing.";
|
LOG(LS_ERROR) << "Failed to create AudioProcessing.";
|
||||||
_shared->SetLastError(VE_NO_MEMORY);
|
_shared->SetLastError(VE_NO_MEMORY);
|
||||||
|
@ -36,7 +36,7 @@ class VoEBaseTest : public ::testing::Test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(VoEBaseTest, AcceptsAudioProcessingPtr) {
|
TEST_F(VoEBaseTest, AcceptsAudioProcessingPtr) {
|
||||||
AudioProcessing* audioproc = AudioProcessing::Create(0);
|
AudioProcessing* audioproc = AudioProcessing::Create();
|
||||||
EXPECT_EQ(0, base_->Init(adm_.get(), audioproc));
|
EXPECT_EQ(0, base_->Init(adm_.get(), audioproc));
|
||||||
EXPECT_EQ(audioproc, base_->audio_processing());
|
EXPECT_EQ(audioproc, base_->audio_processing());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user