Remove deprecated code from audio device.

Bug: webrtc:7306, webrtc:10198
Change-Id: Iaeef4d7449c18325511f1763eba510b385959bfe
Reviewed-on: https://webrtc-review.googlesource.com/c/118446
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26383}
This commit is contained in:
Mirko Bonadei
2019-01-19 16:50:32 +01:00
committed by Commit Bot
parent 88ca008e56
commit 2fd09a40af
7 changed files with 2 additions and 38 deletions

View File

@ -514,7 +514,7 @@ class AudioDeviceTest : public ::testing::Test {
rtc::scoped_refptr<AudioDeviceModule> CreateAudioDevice(
AudioDeviceModule::AudioLayer audio_layer) {
rtc::scoped_refptr<AudioDeviceModule> module(
AudioDeviceModule::Create(0, audio_layer));
AudioDeviceModule::Create(audio_layer));
return module;
}

View File

@ -289,13 +289,4 @@ rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceWithDataObserver(
return audio_device;
}
// TODO(bugs.webrtc.org/7306): deprecated.
rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceWithDataObserver(
const int32_t id,
const AudioDeviceModule::AudioLayer audio_layer,
AudioDeviceDataObserver* observer) {
return CreateAudioDeviceWithDataObserver(audio_layer, observer);
}
} // namespace webrtc

View File

@ -112,14 +112,6 @@ rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest(
return audioDevice;
}
// TODO(bugs.webrtc.org/7306): deprecated.
rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create(
const int32_t id,
const AudioLayer audio_layer) {
RTC_LOG(INFO) << __FUNCTION__;
return AudioDeviceModule::Create(audio_layer);
}
AudioDeviceModuleImpl::AudioDeviceModuleImpl(const AudioLayer audioLayer)
: audio_layer_(audioLayer) {
RTC_LOG(INFO) << __FUNCTION__;

View File

@ -21,10 +21,6 @@ class AudioDeviceModuleForTest;
class AudioDeviceModule : public rtc::RefCountInterface {
public:
// Deprecated.
// TODO(henrika): to be removed.
enum ErrorCode { kAdmErrNone = 0, kAdmErrArgument = 1 };
enum AudioLayer {
kPlatformDefaultAudio = 0,
kWindowsCoreAudio,
@ -44,9 +40,6 @@ class AudioDeviceModule : public rtc::RefCountInterface {
kDefaultDevice = -2
};
// TODO(bugs.webrtc.org/7306): deprecated.
enum ChannelType { kChannelLeft = 0, kChannelRight = 1, kChannelBoth = 2 };
public:
// Creates a default ADM for usage in production code.
static rtc::scoped_refptr<AudioDeviceModule> Create(
@ -55,10 +48,6 @@ class AudioDeviceModule : public rtc::RefCountInterface {
// in production code.
static rtc::scoped_refptr<AudioDeviceModuleForTest> CreateForTest(
const AudioLayer audio_layer);
// TODO(bugs.webrtc.org/7306): deprecated (to be removed).
static rtc::scoped_refptr<AudioDeviceModule> Create(
const int32_t id,
const AudioLayer audio_layer);
// Retrieve the currently utilized audio layer
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;

View File

@ -44,12 +44,6 @@ rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceWithDataObserver(
const AudioDeviceModule::AudioLayer audio_layer,
AudioDeviceDataObserver* observer);
// TODO(bugs.webrtc.org/7306): deprecated.
rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceWithDataObserver(
const int32_t id,
const AudioDeviceModule::AudioLayer audio_layer,
AudioDeviceDataObserver* observer);
} // namespace webrtc
#endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_DATA_OBSERVER_H_

View File

@ -26,7 +26,6 @@ class MockAudioDeviceModule : public AudioDeviceModule {
MOCK_CONST_METHOD0(Release, rtc::RefCountReleaseStatus());
// AudioDeviceModule.
MOCK_CONST_METHOD1(ActiveAudioLayer, int32_t(AudioLayer* audioLayer));
MOCK_CONST_METHOD0(LastError, ErrorCode());
MOCK_METHOD1(RegisterAudioCallback, int32_t(AudioTransport* audioCallback));
MOCK_METHOD0(Init, int32_t());
MOCK_METHOD0(Terminate, int32_t());

View File

@ -518,8 +518,7 @@ class AudioDeviceTest : public ::testing::Test {
rtc::scoped_refptr<AudioDeviceModule> CreateAudioDevice(
AudioDeviceModule::AudioLayer audio_layer) {
rtc::scoped_refptr<AudioDeviceModule> module(
AudioDeviceModule::Create(0, audio_layer));
rtc::scoped_refptr<AudioDeviceModule> module(AudioDeviceModule::Create(audio_layer));
return module;
}